Skip to content

Conversation

@ringoldsdev
Copy link
Owner

This pull request introduces significant enhancements to the pipeline framework, focusing on context-aware transformations, improved threading capabilities, and updates to test coverage. The most important changes include introducing explicit context handling in transformers, adding a parallel transformer for multi-threaded execution, and refactoring the pipeline and transformer classes for better type safety and functionality.

Enhancements to Context Handling:

  • efemel/pipeline/helpers.py: Added utility functions is_context_aware and is_context_aware_reduce to determine if functions are context-aware, along with the PipelineContext class to manage shared context across pipeline operations.
  • efemel/pipeline/pipeline.py: Introduced a context method to set shared context for pipelines and updated the apply method to handle context-aware transformers.

Parallel Execution:

  • efemel/pipeline/transformers/parallel.py: Added the ParallelTransformer class to enable concurrent execution of transformations using multiple threads, with support for ordered and unordered results.

Refactoring for Type Safety and Explicit Context:

  • efemel/pipeline/transformers/transformer.py: Refactored the Transformer class to explicitly pass context through all transformation operations, replacing implicit context handling with explicit context-aware function signatures.

Performance and Test Updates:

  • performance_test.py: Updated performance tests to use the new Transformer class and added type hints for better clarity. [1] [2]
  • test.py: Added a new test script to validate pipeline transformations with large datasets.
  • tests/test_integration.py: Updated integration tests to validate context sharing and added a test for the new parallel transformer. [1] [2]

@ringoldsdev ringoldsdev merged commit a78369f into main Jul 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants