Refactor aggregation module and enhance structure

- Split the `aggregation.py` file into a dedicated sub-package, improving modularity and maintainability.
- Moved `TimeframeBucket`, `RealTimeCandleProcessor`, and `BatchCandleProcessor` classes into their respective files within the new `aggregation` sub-package.
- Introduced utility functions for trade aggregation and validation, enhancing code organization.
- Updated import paths throughout the codebase to reflect the new structure, ensuring compatibility.
- Added safety net tests for the aggregation package to verify core functionality and prevent regressions during refactoring.

These changes enhance the overall architecture of the aggregation module, making it more scalable and easier to manage.
This commit is contained in:
Vasily.onl
2025-06-07 01:17:22 +08:00
parent fe9d8e75ed
commit e7ede7f329
17 changed files with 965 additions and 616 deletions

View File

@@ -17,13 +17,13 @@ from ...common import (
StandardizedTrade,
OHLCVCandle,
CandleProcessingConfig,
RealTimeCandleProcessor,
BaseDataValidator,
ValidationResult,
BaseDataTransformer,
UnifiedDataTransformer,
create_standardized_trade
)
from ...common.aggregation.realtime import RealTimeCandleProcessor
class OKXMessageType(Enum):