trudag.config.config
GeneralConfig
Bases: TrustableConfig
Given a custom configuration list, validates it. Given no configuration, uses the default configuration in trudag.
get
Provides a way to search for values in the sub-sections of the configuration by recursively searching for the value of a given keys list. For example: get(["reports", "TSF", "enable_figures"]) will return the value for enable figures under the TSF report (.i.e. False).
override_config
Overrides the configuration content with the given custom_config content.
safe_get
Provides a safe way to search for values in the sub-sections of the configuration by recursively searching for the value of a given keys list. If given keys don't exist in the configuration, we fallback on the default general config. For example: get(["reports", "TSF", "enable_figures"]) will return the value for enable figures under the TSF report (.i.e. False).
TrustableConfig
Bases: Protocol
Protocol to support different kinds of configuration to be used in the trustable project. It has a basic requirement to support schema accessor, version of configuration, and configuration content.
schema
property
Getter method to be implemented for returning the schema used in the configuration.
Returns:
trudag.config.schema.Schema of the configuration that validates the configuration content.