pandemia.config
Module supporting configuration of the simulation.
A configuration is set in a single YAML file, and used by the simulator and simulator components.
Module Contents
Classes
Represents a simulation configuration. |
- class pandemia.config.Config(filename: str | None = None, _dict: dict | None = None, dirname: str | None = None)
Represents a simulation configuration.
This class behaves like a dict, but is read-only
- INT_INDEX_FORMAT
- subconfig(key: str) Config
Create a Config object from a key in this config object, with the same directory settings.
- filepath(key: str, path: str | None = None, *, ensure_exists: bool = False)
Return the value at ‘key’ but as a filepath. Filepaths in config are relative to the basedir, unless they are specified as absolute (e.g. they have a leading slash or drive letter
- static load_config(filename: str) dict
Load a YAML config file and return the dict.