| 24 | |
| 25 | |
| 26 | def load_config(config_path: str) -> dict: |
| 27 | if not os.path.exists(config_path): |
| 28 | logger.error(f"Configuration file not found: {config_path}") |
| 29 | raise FileNotFoundError(f"Configuration file not found: {config_path}") |
| 30 | with open(config_path, "r", encoding="utf-8") as f: |
| 31 | try: |
| 32 | config = yaml.safe_load(f) |
| 33 | except yaml.YAMLError as e: |
| 34 | logger.error(f"Error parsing YAML file: {e}", exc_info=True) |
| 35 | raise ValueError(f"Error parsing YAML file: {e}") |
| 36 | return config |
| 37 | |
| 38 | |
| 39 | def find_scalars_in_event_file(event_file: str) -> list[str]: |