Skip to content

ReEDSParser

Source

Parser for ReEDS model data using the Plugin[ReEDSConfig] pattern.

>>> from r2x_reeds import ReEDSParser
>>> assert ReEDSParser is not None

Bases: Plugin[ReEDSConfig]. Inherited contracts remain defined by the base classes.

Source

@classmethod
from_context(cls, ctx: PluginContext[ReEDSConfig]) -> Self

Create the parser and install custom ReEDS data readers.

Source

on_validate_config(self) -> Result[None, str]

Validate configuration assets before upgrades or data I/O.

Source

on_upgrade(self) -> Result[System | None, str]

Run ReEDS file upgrades before input validation.

Source

read_data_file(self, name: str) -> Any

Read a data file from the store.

Source

create_component(self, component_class: type[Component], **kwargs: Any) -> Component

Create a component instance with consistent validation handling.

Source

on_validate(self) -> Result[None, str]

Validate input data after upgrades, before building the system.

Source

on_prepare(self) -> Result[None, str]

Prepare and normalize configuration, time arrays, and component datasets.

Source

on_build(self) -> Result[System, str]

Build and return the complete infrasys.System.

Continue with the Python API overview and transform contracts.