energy_fault_detector.config.base_config

Base config class template

class BaseConfig(config_filename=None, config_dict=None)

Bases: ABC

Base configuration class. either config_filename or config_dict must be provided.

read_config(part=None)

Read and validate the configuration.

Return type:

None

update_config(new_config_dict)

Update the configuration. Sets the configuration_file path to None.

Parameters:

new_config_dict (Dict[str, Any]) – dictionary with the new configuration.

Return type:

None

write_config(file_name=None, overwrite=False)

Write the configuration to a yaml file

Return type:

None

exception InvalidConfigFile

Bases: Exception

Raise when config file is not valid