feat(data): add ENTSO-E interim-CSV loaders (ported from spotforecast2.tasks)#371
Merged
Conversation
Flagged by black 25 / isort 8; no functional change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…2.tasks) entsoe_data_loader and entsoe_test_data_loader move verbatim from spotforecast2.tasks.task_entsoe ahead of that subpackage's removal; they depend only on pandas and get_data_home, so the safe package is their natural home. Exported from spotforecast2_safe.data alongside load_actual_combined; documented under the Data quartodoc section; loader behavior covered by tests/test_entsoe_loader.py. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
74c8945 to
39cfa84
Compare
| import pandas as pd | ||
| import pytest | ||
|
|
||
| import spotforecast2_safe.data.entsoe_loader as entsoe_loader |
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.
Summary
Ports
entsoe_data_loader/entsoe_test_data_loaderverbatim fromspotforecast2.tasks.task_entsoeinto a newspotforecast2_safe.data.entsoe_loadermodule (modeled ondata/demo_loader.py). They depend only on pandas +get_data_home, so the safe package is their natural home.This is step 1 of the cross-repo removal of
spotforecast2.tasks(KBtask-sf2-task-entsoe-extraction): bart26k-lecture switches its imports here next, then sf2 deletes the subpackage.Changes
src/spotforecast2_safe/data/entsoe_loader.py(docstrings + live examples moved along, import paths updated)spotforecast2_safe.dataalongsideload_actual_combinedtests/test_entsoe_loader.py(8 tests: path resolution, FileNotFoundError hint, horizon windowing, tz handling)_quarto.yml+ generated reference pages (Data section)style:commit fixes pre-existing black/isort drift in 6 untouched filesVerification
uv run pytest tests/ -q— 2599 passed, 1 skippedquarto render --no-cache— green (3 pre-existing dead-link warnings abouttask_safe_n_to_1*pages, unrelated)🤖 Generated with Claude Code