Args: config_path: the path to the configuration file to load Returns: The configuration file with pure Python classes
(config_path: str | Path)
| 19 | |
| 20 | |
| 21 | def read_config_as_dict(config_path: str | Path) -> dict: |
| 22 | """ |
| 23 | Args: |
| 24 | config_path: the path to the configuration file to load |
| 25 | |
| 26 | Returns: |
| 27 | The configuration file with pure Python classes |
| 28 | """ |
| 29 | with open(config_path) as f: |
| 30 | cfg = YAML(typ="safe", pure=True).load(f) |
| 31 | |
| 32 | return cfg |
| 33 | |
| 34 | |
| 35 | def write_config(config_path: str | Path, config: dict, overwrite: bool = True) -> None: |
no test coverage detected