Skip to content

Handle curves and exports via the metadata endpoint#193

Open
louispt1 wants to merge 2 commits into
mainfrom
capacity-curves
Open

Handle curves and exports via the metadata endpoint#193
louispt1 wants to merge 2 commits into
mainfrom
capacity-curves

Conversation

@louispt1

@louispt1 louispt1 commented Jun 29, 2026

Copy link
Copy Markdown
Member

Context

Fetch curves from the added metadata endpoints in etengine, with a fallback for version 2025-01. This way available curves and exports are discovered via the endpoint and cached, and then that information is re-used when fetching outputs.

Implemented changes

  • Adds CurveMetadataService — fetches /curves/metadata and /exports/metadata from ETEngine at runtime, with in-memory TTL cache, disk cache keyed by base URL, and hardcoded fallback defaults for stable version use
  • Adds CurveRegistry with canonical (new name) / wire (on-wire name) split so curve requests remain compatible with 2025-01 engines that only know old names (e.g. merit_order, not electricity_profiles)
  • Replaces hard-coded export and curve name lists throughout validators.py, annual_exports.py, hourly_output_curves.py, and excel_utils.py

Related

Goes with this etengine PR and this documentation PR

Checklist

  • I have tested these changes
  • I have updated documentation as needed
  • I have tagged the relevant people for review

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