- Extracted `OHLCVData` and validation logic into a new `common/ohlcv_data.py` module, promoting better organization and reusability. - Updated `BaseDataCollector` to utilize the new `validate_ohlcv_data` function for improved data validation, enhancing code clarity and maintainability. - Refactored imports in `data/__init__.py` to reflect the new structure, ensuring consistent access to common data types and exceptions. - Removed redundant data validation logic from `BaseDataCollector`, streamlining its responsibilities. - Added unit tests for `OHLCVData` and validation functions to ensure correctness and reliability. These changes improve the architecture of the data module, aligning with project standards for maintainability and performance.
27 lines
813 B
Python
27 lines
813 B
Python
"""
|
|
Data collection and processing package for the Crypto Trading Bot Platform.
|
|
|
|
This package contains modules for collecting market data from various exchanges,
|
|
processing and validating the data, and storing it in the database.
|
|
"""
|
|
|
|
from .base_collector import (
|
|
BaseDataCollector, DataCollectorError
|
|
)
|
|
from .collector.collector_state_telemetry import CollectorStatus
|
|
from .common.ohlcv_data import OHLCVData, DataValidationError
|
|
from .common.data_types import DataType, MarketDataPoint
|
|
from .collector_manager import CollectorManager, ManagerStatus, CollectorConfig
|
|
|
|
__all__ = [
|
|
'BaseDataCollector',
|
|
'DataCollectorError',
|
|
'DataValidationError',
|
|
'DataType',
|
|
'CollectorStatus',
|
|
'MarketDataPoint',
|
|
'OHLCVData',
|
|
'CollectorManager',
|
|
'ManagerStatus',
|
|
'CollectorConfig'
|
|
] |