dgs.utils.config

Util- and helper-functions for handling configuration files and passing down sub configurations to other modules.

Contains functions for validating configuration and parameter of modules.

Module Attributes

DEF_VAL

Default values and parameters.

Module Functions

construct_yaml_tuple(self, node)

PyYaml does not support tuples, change that!

fill_in_defaults(config, default_cfg[, copy])

Use values of a given configuration or the default configuration, to fill in missing values of the current configuration.

get_sub_config(config, path)

Given a full configuration file in nested dict style, return the given subtree by using the items in path as node keys.

insert_into_config(path, value, original[, copy])

Insert a sub-configuration at the given path into the original or a copy of it, possibly overwriting existing values.

load_config(filepath)

Load a config.yaml file as nested dictionary.

save_config(filepath, config)

Given a configuration, save it as .yaml file at the given filepath.