armi.config module¶
Handle the loading and application of configuration values
-
class
armi.config.ConfigHandler[source]¶ Bases:
objectExposes the contents of the config files in the TEMPLATE_DATA location to pythonic access
The config files are split logically into “user”/”u” files and “template”/”t” files. Template files define what configuration values ARMI expects to exist, and will be duplicated locally for the user, where thereafter they exist as user files. User files contain the customizations of the user. Values that don’t exist in the user file will be defaulted by the template files.
Configs are not loaded on construction, but rather on first access. This prevents potential race conditions when multiple processes are running (MPI, xdist testing, etc.)
-
property
configs¶
-
__getattribute__(key)[source]¶ Get attribute from this object.
Notes
This loads config upon first access and then returns it thereafter. The
__getattribute__method is used (vs.__getattr__) because many of the attributes of this object are created from config file names at runtime and are not known in advance. We need this because we want to intercept both the explicitly-managed attributes (_configs,submitter) and the implicitly-managed ones whose names are discovered at runtime. The strange-lookingobject-based calls are required to avoid infinite recursion.
-
property