opihiexarata.library.config module

Controls the inputting of configuration files. This also serves to bring all of the configuration parameters into a more accessible space which other parts of Exarata can use.

Note these configuration constant parameters are all accessed using capital letters regardless of the configuration file’s labels. Moreover, there are constant parameters which are stored here which are not otherwise changeable by the configuration file.

opihiexarata.library.config.generate_configuration_file_copy(filename: str, overwrite=False) None[source]

This generates a copy of the default configuration file to the given location.

Parameters:
  • filename (string) – The pathname or filename where the configuration file should be put to. If it does not have the proper yaml extension, it will be added.

  • overwrite (bool, default = False) – If the file already exists, overwrite it. If False, it would raise an error instead.

Return type:

None

opihiexarata.library.config.generate_secrets_file_copy(filename: str, overwrite=False) None[source]

This generates a copy of the secrets configuration file to the given location.

Parameters:
  • filename (string) – The pathname or filename where the configuration file should be put to. If it does not have the proper yaml extension, it will be added.

  • overwrite (bool, default = False) – If the file already exists, overwrite it. If False, it would raise an error instead.

Return type:

None

opihiexarata.library.config.load_configuration_file(filename: str) dict[source]

Loads a configuration file and outputs a dictionary of parameters.

Note configuration files should be flat, there should be no nested configuration parameters.

Parameters:

filename (string) – The filename of the configuration file, with the extension. Will raise if the filename is not the correct extension, just as a quick check.

Returns:

configuration_dict – The dictionary which contains all of the configuration parameters within it.

Return type:

dictionary

opihiexarata.library.config.load_then_apply_configuration(filename: str) None[source]

Loads a configuration file, then applies it to the entire Exarata system.

Loads a configuration file and overwrites any overlapping configurations. It writes the configuration to the configuration module for usage throughout the entire program.

Note configuration files should be flat, there should be no nested configuration parameters.

Parameters:

filename (string) – The filename of the configuration file, with the extension. Will raise if the filename is not the correct extension, just as a quick check.

Return type:

None