tud_lbm.config.adapter_base
Base class for configuration file adapters.
Classes
Converts a config source into a SimulationConfig and back. |
Functions
|
Return the appropriate adapter for path based on file extension. |
Module Contents
- class tud_lbm.config.adapter_base.ConfigAdapter[source]
Bases:
abc.ABCConverts a config source into a SimulationConfig and back.
- abstractmethod load_raw(source: Any) dict[str, Any][source]
Parse source and return a flat config dict without instantiating SimulationConfig.
- abstractmethod save(config: tud_lbm.config.simulation_config.SimulationConfig, path: str) None[source]
Save a
SimulationConfigto path.
- load(source: Any) tud_lbm.config.simulation_config.SimulationConfig[source]
Parse source and return a validated
SimulationConfig.
- classmethod build_sections(config: tud_lbm.config.simulation_config.SimulationConfig) dict[str, Any][source]
Build a format-agnostic nested dict from config, routed by CONFIG_SECTION metadata.
- tud_lbm.config.adapter_base.get_adapter(path: str) ConfigAdapter[source]
Return the appropriate adapter for path based on file extension.