Skip to content

feat(types): rooftop solar forecast metric, 30m interval #675 - #39

Merged
nc9 merged 13 commits into
mainfrom
feat/rooftop-forecast
Oct 7, 2026
Merged

nc9 merged 13 commits into
mainfrom
feat/rooftop-forecast

Conversation

@nc9

@nc9 nc9 commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

client side of opennem/opennem#675 (rooftop solar forecast), plus two response shape fixes.

forecast:

  • MarketMetric.SOLAR_ROOFTOP_FORECAST
  • 30m on DataInterval and VALID_INTERVALS. NetworkTimeSeries.interval is the literal so a 30m response failed validation before this
  • optional forecast_run_time on NetworkTimeSeries, None for history loaded before oct 2026
  • examples/rooftop_forecast.py, base url via OPENELECTRICITY_API_URL

response shape (live api sends date_start/date_end and columns.region):

  • NetworkTimeSeries.date_start/date_end and TimeSeriesColumns.region (+ status). start/end/network_region stay as deprecated aliases with the same values, kept in step on validate, assignment, copy, construct and unpickle, and they warn on read
  • to_records()/to_pandas()/to_polars() no longer shift intervals +10h and include region (and unit_code for facilities). default row shape is unchanged, one row per value. new keyword-only merge_metrics=True gives one row per interval + grouping with a column per metric
  • to_polars() scans every row for the schema, it dropped any metric whose rows started after row 100
  • old-shape responses (start/end, network_region, utc timestamps) still parse and give the same record columns and times as before

breaking for data frame users: interval is no longer +10h and records gain region/status/unit_code. changelog has a breaking changes section with a before/after row, readme has an upgrading to 0.12 note.

readme, changelog, bump to 0.12.0. don't publish until the prod release.

pytest (56 incl. new compat + regression tests, also under -W error::DeprecationWarning), ruff, basedpyright (no new errors) pass. smoke tested against dev 4.5.17.dev2, all pass.

@nc9
nc9 marked this pull request as ready for review October 7, 2026 02:38
@nc9
nc9 merged commit c061eb4 into main Oct 7, 2026
7 checks passed
@nc9
nc9 deleted the feat/rooftop-forecast branch October 7, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant