utils.config
ConfigHandler: load TOML config files with optional section overrides.
- class kpfpipe.utils.config.ConfigHandler(path, overrides=None)
Bases:
objectLoad a TOML config file, with optional in-memory section overrides.
- Parameters:
path (str or pathlib.Path) – Path to the TOML config file.
overrides (dict or None, optional) – Per-section overrides applied after loading; each value is merged into the matching section dict, or replaces the section if it is not a dict.
- get_params(sections=None)
Flatten sections into one dict; nested dicts join as key_subkey.
- load_config(path=None)
Load/reload the TOML into self.config (optional path override).