Feat/pipeline improvements#5
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds significant pipeline functionality improvements to epftoolbox2, including data caching, validation framework, pipeline serialization, and a new calendar-based data source.
Key changes:
- Introduces a caching system for data sources with automatic gap detection and incremental fetching
- Adds a validation framework with three validators (ContinuityValidator, NullCheckValidator, EdaValidator)
- Implements pipeline serialization to/from YAML with component registry
- Adds CalendarSource for country-specific calendar features (holidays, weekdays, daylight hours)
- Centralizes logging configuration across the codebase
- Adds ResampleTransformer for time-series resampling
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| epftoolbox2/pipelines/data_pipeline.py | Core pipeline enhancements: adds validators, caching (both file and database-backed), serialization (save/load), timestamp parsing, and changes DataFrame merging from join to concat |
| epftoolbox2/logging.py | New centralized logging module using Rich for consistent formatting across components |
| epftoolbox2/data/cache_manager.py | New cache manager implementing hash-based caching with range tracking, gap detection, and incremental data storage |
| epftoolbox2/data/validators/*.py | New validation framework with base class, result container, and three concrete validators for data quality checks |
| epftoolbox2/data/sources/calendar.py | New calendar data source providing country-specific features like holidays, weekday encoding, and astronomical data |
| epftoolbox2/data/sources/base.py | Adds abstract get_cache_config method to DataSource interface |
| epftoolbox2/data/sources/{entsoe,open_meteo,csv}.py | Updates existing sources with get_cache_config implementations and migrates to centralized logging |
| epftoolbox2/data/transformers/resample.py | New transformer for resampling time-series data with multiple interpolation methods |
| epftoolbox2/data/transformers/init.py | Exports ResampleTransformer |
| tests/pipelines/test_pipeline.py | Adds tests for caching and serialization features |
| tests/data/validators/test_validators.py | Comprehensive tests for all three validators |
| tests/data/test_cache_manager.py | Tests for cache key generation, read/write operations, and gap detection |
| tests/data/sources/test_calendar.py | Tests for CalendarSource features and validation |
| requirements.txt, pyproject.toml | Adds pyyaml, holidays, and astral dependencies |
| .gitignore | Adds .cache/ directory and main.py to ignored files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.