tud_lbm.config.adapter_base =========================== .. py:module:: tud_lbm.config.adapter_base .. autoapi-nested-parse:: Base class for configuration file adapters. Classes ------- .. autoapisummary:: tud_lbm.config.adapter_base.ConfigAdapter Functions --------- .. autoapisummary:: tud_lbm.config.adapter_base.get_adapter Module Contents --------------- .. py:class:: ConfigAdapter Bases: :py:obj:`abc.ABC` Converts a config file into a SimulationConfig and back. .. py:method:: load_raw(path: str) -> dict[str, Any] :abstractmethod: Parse *path* and return raw configuration dict. Unlike :meth:`load`, this returns the raw config dict without instantiating :class:`SimulationConfig`. Useful for detecting array fields before expansion. :param path: Filesystem path to a configuration file. :returns: Raw config dictionary. .. py:method:: load(path: str) -> tud_lbm.config.simulation_config.SimulationConfig :abstractmethod: Parse *path* and return a :class:`SimulationConfig`. :param path: Filesystem path to a configuration file. :returns: A validated :class:`SimulationConfig`. .. py:method:: save(config: tud_lbm.config.simulation_config.SimulationConfig, path: str) -> None :abstractmethod: Save a :class:`SimulationConfig` to *path*. :param config: Configuration to save. :param path: Filesystem path where to save the configuration. .. py:method:: build_sections(config: tud_lbm.config.simulation_config.SimulationConfig) -> dict[str, Any] :classmethod: Build a format-agnostic nested dict from *config*, routed by CONFIG_SECTION metadata. .. py:function:: get_adapter(path: str) -> ConfigAdapter Return the appropriate adapter for *path* based on file extension.