config
config
Read and validate kimmdy.yml configuration files and package into a parsed format for internal use.
Classes
| Name | Description |
|---|---|
| Config | Internal representation of the configuration generated |
Config
config.Config(self, input_file=None, opts=None, scheme=None, section='config', logfile=None, loglevel=None)
Internal representation of the configuration generated from the input file, which enables validation before running and computationally expensive operations.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
input_file |
Path | None | Path to the config yaml file. | None |
recursive_dict |
For internal use only, used in reading settings in recursively. | required | |
scheme |
dict | None | dict containing types and defaults for casting and validating settings. | None |
section |
str | current section e.g. to determine the level of recursion in nested configs e.g. “config”, “config.mds” or “config.reactions.homolysis” | 'config' |
Methods
| Name | Description |
|---|---|
| attr | Get the value of a specific attribute. |
| get_attributes | Get a list of all attributes without hidden ones (_<…>). |
attr
config.Config.attr(attribute)
Get the value of a specific attribute. Alias for self.__getattribute__
get_attributes
config.Config.get_attributes()
Get a list of all attributes without hidden ones (_<…>).
Functions
| Name | Description |
|---|---|
| configure_logger | Configure logging. |
configure_logger
config.configure_logger(config)
Configure logging.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
config |
Config | configuration that contains log.level and log.file | required |