rizer.spice.backend.services.config_loader#
Load circuit configurations from YAML files (STONE-inspired format).
Each YAML file defines one circuit type with its metadata and default
parameters. The STONE convention uses component type names as keys
(e.g. resistance_model: {Constant: {}}) and this loader converts
that structure into the flat dicts expected by the Pydantic schemas and
the frontend API.
Attributes#
Functions#
|
Scan config_dir for |
Module Contents#
- type rizer.spice.backend.services.config_loader.CircuitRegistry = dict[str, CircuitInfo]#
- rizer.spice.backend.services.config_loader.logger#
- rizer.spice.backend.services.config_loader.load_circuit_configs(config_dir: str | pathlib.Path | None = None) tuple[CircuitRegistry, DefaultParams, OutputLabels]#
Scan config_dir for
*.yamlfiles and return registry, defaults, and output labels.- Parameters:
config_dir (
strorpathlib.Path, optional) – Directory containing the YAML config files. Defaults to therizer/configs/directory shipped with the package.- Returns:
A 3-tuple (registry, defaults, output_labels). registry maps circuit-id to
CircuitInfo; defaults maps circuit-id to a flat parameter dict for the API; output_labels maps circuit-id to a dict of series_key -> label.- Return type: