eradiate.config¶
This module exposes components dedicated to the global configuration of Eradiate.
Core members¶
- eradiate.config.SOURCE_DIR = pathlib.Path or None¶
Path to the Eradiate source code directory, if relevant. Takes the value of the
ERADIATE_SOURCE_DIRenvironment variable if it is set; otherwise defaults toNone.
- eradiate.config.settings = dynaconf.Dynaconf¶
Main settings data structure. It supports array and attribute indexing, both case-insensitive:
settings["some.key"] settings["SOME.KEY"] settings.some.key settings.SOME.KEY
All settings have a default value specified by the default configuration file and can be overridden by the user from an
eradiate.tomlfile, placed in the current working directory or higher. Each setting can also be overridden using environment variables with theERADIATE_prefix.Example
The
some.keysetting will be accessed asERADIATE_SOME__KEY(note the double underscore to figure the hierarchical separator).
Utility¶
- class eradiate.config.ProgressLevel(value)[source]¶
An enumeration defining valid progress levels.
This is an integer enumeration, meaning that levels can be compared to numerics.
- static convert(value)[source]¶
Attempt conversion of a value to an
ProgressLevelinstance. The conversion protocol is as follows:If
valueis a string, it is converted to upper case and passed to the indexing operator ofProgressLevel.If
valueis an integer, it is passed to the call operator ofProgressLevel.If
valueis aProgressLevelinstance, it is returned without change.Otherwise, the method raises an exception.
- Parameters:
value – Value to attempt conversion of.
- Returns:
Converted value- Raises:
TypeError – If no conversion protocol exists for
value.
- KERNEL = 2¶
Up to kernel level progress
- NONE = 0¶
No progress
- SPECTRAL_LOOP = 1¶
Up to spectral loop level progress