feat(power_forecast): time-window mode for get_init_times + DE day-ahead examples#79
Merged
Merged
Conversation
Add start_time/end_time params to get_init_times. When set, the endpoint is queried by init_time range and limit is omitted so the full window is returned (bypassing the 1000-item count cap). Includes unit and functional tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Add an example that plots a year of DE day-ahead generation from the 09:00 UTC run, and the last month of DE Solar day-ahead comparing the 10/12/18 UTC init hours. Co-authored-by: Cursor <cursoragent@cursor.com>
Generalize the day-ahead example to run for both DE and GB, pulling each zone's available PSR types for the yearly plot. Co-authored-by: Cursor <cursoragent@cursor.com>
jua-mark
approved these changes
Jun 4, 2026
The init-times endpoint may return naive datetimes; normalize to UTC before comparing against the tz-aware window bounds. Co-authored-by: Cursor <cursoragent@cursor.com>
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
start_time/end_timetoPowerForecast.get_init_times. In this time-window mode the endpoint is queried byinit_timerange andlimitis omitted, so the full window is returned (the legacy 1000-item count cap no longer truncates long ranges). Default count mode is unchanged.examples/power_forecast/plot_day_ahead_timeseries.py) producing two DE plots:Backend dependency
Relies on the new
init-timestime-window filtering. Verified against the live API: a 30-day DE window returns 2880 init times (> 1000) whenlimitis omitted.Test plan
uv run pytest tests/power_forecast/test_get_init_times.py(unit, mocked)test_get_init_times_time_windowasserts window bounds and >1000 resultsMade with Cursor