Skip to content

Index

Configuration management.

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.

Parameters:

config

The current configuration dictionary.

TYPE: Config

Returns:

str

The version number

Raises:

ConfigurationError

If it can’t find the current version

get_configuration

get_configuration(
    config_file: Union[str, Path, None] = None,
    **overrides: Any
) -> Config

Return the configuration based on any configuration files and overrides.

Parameters:

config_file

An explicit configuration file to use, otherwise search for one

TYPE: Union[str, Path, None]

DEFAULT: None

**overrides

Specific configuration key-values to override in the configuration

TYPE: Any

DEFAULT: {}

Returns:

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.