Skip to content

Configuration

configuration

Representations of parsed configuration files.

IdentifierString = Annotated[str, Field(min_length=1, max_length=255, pattern='^[a-z]([a-z0-9\\_]*[a-z0-9])?$'), AfterValidator(_identifier_string)] module-attribute

A string type representing a valid identifier for named configuration elements.

ModuleGroupModel = Annotated[dict[IdentifierString, ModuleModel], BeforeValidator(_to_default_dict)] module-attribute

Module group configuration model for flepimop2.

ConfigurationModel

Bases: YamlSerializableBaseModel

Configuration model for flepimop2.

This model serves as the parent container for a parsed configuration file.

Attributes:

Name Type Description
name str | None

An optional name for the configuration.

engines ModuleGroupModel

A dictionary of engine configurations.

systems ModuleGroupModel

A dictionary of system configurations.

backends ModuleGroupModel

A dictionary of backend configurations.

process ModuleGroupModel

A dictionary of process configurations.

parameters ModuleGroupModel

A dictionary of parameter configurations.

simulate dict[IdentifierString, SimulateSpecificationModel]

A dictionary of simulation configurations.

ModuleModel

Bases: BaseModel

Module configuration model for flepimop2.

Attributes:

Name Type Description
module str

The type of the module.

SimulateSpecificationModel

Bases: BaseModel

Model for specifying a simulation for flepimop2.

Attributes:

Name Type Description
engine IdentifierString

The name of the engine to use for the simulation.

system IdentifierString

The name of the system to simulate.

backend IdentifierString

The name of the backend to use for the simulation.

times RangeSpec

A list of time points at which to perform the simulation.

params dict[str, float] | None

Optional dictionary of parameters for the simulation.

t_eval property

Get the evaluation times as a NumPy array.

Returns:

Type Description
Float64NDArray

A NumPy array of evaluation times.