pySimBlocks.project.load_project_config

pySimBlocks.project.load_project_config.load_project_config(project_yaml: str | Path) Tuple[SimulationConfig, Dict[str, Any], PlotConfig | None, str, Path][source]

Load a full pySimBlocks unified project.yaml configuration.

Parses and validates all sections of the project file, evaluates parameter expressions against the optional external parameters module, and returns all configuration objects needed to build and run the simulation.

Parameters:

project_yaml – Path to the unified project.yaml file.

Returns:

A tuple (sim_cfg, model_dict, plot_cfg, project_name, params_dir) where:

  • sim_cfg: validated SimulationConfig.

  • model_dict: model dict with 'blocks' and 'connections' sections ready to pass to build_model_from_dict().

  • plot_cfg: PlotConfig or None if no plots are defined.

  • project_name: project name string from project.name.

  • params_dir: resolved directory of the project file.

Raises:
  • FileNotFoundError – If the project file does not exist.

  • ValueError – If the file is malformed, the schema version is wrong, or required fields are missing.