syside.load_model

load_model(paths: Iterable[str | os.PathLike[Any]], *, warnings_as_errors: bool = False) tuple[syside.Model, syside.Diagnostics]
load_model(*, sysml_source: str, kerml_source: str | None = ..., warnings_as_errors: bool = False) tuple[syside.Model, syside.Diagnostics]
load_model(*, kerml_source: str, sysml_source: str | None = ..., warnings_as_errors: bool = False) tuple[syside.Model, syside.Diagnostics]

Load a SysMLv2 model.

At least one of paths, sysml_source, and kerml_source must not be none.

Parameters:
  • paths – The paths to SysMLv2 or KerML files to load. These files must have correct file extensions (.sysml or .kerml).

  • environment – The environment to be used for the model. If this parameter is left to None, uses the default environment. sysml_source: A SysMLv2 source to be loaded as an in-memory file. kerml_source: A KerML source to be loaded as an in-memory file.

Returns:

Model and Diagnostics pair.

Raises:

ModelError – If returned diagnostics contain errors, or if warnings_as_errors is True, if diagnostics contain errors or warnings.