curve_registry
curve_registry
Single source of truth for hourly output curve names.
etengine renamed the hourly curve endpoints (merit_order -> electricity_profiles,
heat_network -> district_heating_profiles, hydrogen -> hydrogen_profiles,
network_gas -> network_gas_profiles) but kept the OLD names as backwards-compatible
aliases. The old names therefore work on BOTH modern engines (pro) and stable engines
(2025-01, which only ever had the old names), so pyetm uses them as the on-the-wire name and
needs no per-engine logic.
Each logical curve maps to:
- canonical: the stable, public key used inside pyetm (cache files, curve.key); the
modern name.
- wire: the name sent in the request URL (the universal old name where one exists).
- endpoint: curves -> /scenarios/{id}/curves/{name}.csv
Classes
CurveSpec
dataclass
Describes one logical curve.
Functions
canonical_names
accept_alias
Resolve a legacy/old curve name to its canonical key.
Emits a deprecation warning for old engine names; unknown names pass through unchanged so non-registered identifiers still reach the engine.
Source code in src/pyetm/config/curve_registry.py
get_spec
Spec for a curve by canonical or alias name, or None if not registered.
curve_type_for
carrier_to_canonical
Carrier alias -> canonical curve name (primary curve per carrier).
build_path
Request path for an output curve / capacity export.
curves -> /scenarios/{id}/curves/{wire_name}.csv
export -> /scenarios/{id}/{name} (scenario-member, mirrors fetch_annual_exports)