Index
Configuration management.
Attributes¶
Classes¶
Functions:¶
check_current_version
¶
check_current_version(config: Config) -> str
Returns the current version.
If the current version is not specified in the config file, command line or env variable, it attempts to retrieve it via a tag.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
The current configuration dictionary.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
The version number |
| RAISES | DESCRIPTION |
|---|---|
ConfigurationError
|
If it can’t find the current version |
get_configuration
¶
get_configuration(config_file: Optional[Pathlike] = None, **overrides: Any) -> Config
Return the configuration based on any configuration files and overrides.
| PARAMETER | DESCRIPTION |
|---|---|
config_file
|
An explicit configuration file to use, otherwise search for one |
**overrides
|
Specific configuration key-values to override in the configuration
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Config
|
The configuration |
set_config_defaults
¶
set_config_defaults(parsed_config: dict[str, Any], **overrides: Any) -> dict[str, Any]
Apply the defaults to the parsed config.