Reading configuration: cij.io.config
Reading and validating configuration files
- cij.io.config.apply_default_config(input_dict)
- Return type
dict
- cij.io.config.read_config(fname, validate=True)
Reading JSON and YAML configuration.
- Parameters
fname (
Union
[str
,Path
]) – name or path of the configuration file; type of parser used will be determined by the extension of the configuration file (.json
,.yml
or.yaml
).validate (
bool
) – whether the input needs to be validated
- Return type
dict
- Returns
the configuration object
- cij.io.config.update_config(input_dict, default_dict)
- Return type
dict
- cij.io.config.validate_config(config)
Validating the configuration object, raises exception when the configuration file is invalid.
- Parameters
config (
dict
) – the configuration object to be validated- Raise
jsonschema.exceptions.ValidationError
- Return type
None