Loader¶
YAML configuration loaders.
Translates human-editable YAML files into models
instances. Default paths resolve to the config/ directory bundled with the
package; pass explicit paths to use custom definitions.
- circuitgenome.synthesizer.loader.load_modules(path=None)[source]¶
Load module variant definitions from a YAML file.
- Parameters:
path (str | Path | None) – Path to a modules YAML file. Defaults to the built-in
opamp_modules.yaml.- Returns:
Dictionary mapping category name → list of
ModuleVariant.- Return type:
dict[str, list[ModuleVariant]]
Example:
from circuitgenome.synthesizer.loader import load_modules modules = load_modules() for variant in modules["input_pair"]: print(variant.name, variant.display_name)
- circuitgenome.synthesizer.loader.load_bias_legs(path=None)[source]¶
Load the typed bias-leg library from a YAML file.
- Parameters:
path (str | Path | None) – Path to a bias-legs YAML file. Defaults to the built-in
bias_legs.yaml.- Returns:
A
BiasLegLibrarywith the master reference, theprefbranch, and one leg template per rail kind (see the YAML header for the contract).- Return type:
- circuitgenome.synthesizer.loader.load_topologies(path=None)[source]¶
Load topology templates from a YAML file.
- Parameters:
path (str | Path | None) – Path to a topologies YAML file. Defaults to the built-in
opamp_topologies.yaml.- Returns:
List of
TopologyTemplate.- Return type:
Example:
from circuitgenome.synthesizer.loader import load_topologies for topo in load_topologies(): print(topo.name, topo.config)