Load config/config.yaml.
()
| 60 | |
| 61 | # ======================== config ======================== |
| 62 | def load_config() -> dict: |
| 63 | """Load config/config.yaml.""" |
| 64 | config_path = os.path.join(PROJECT_ROOT, "config", "config.yaml") |
| 65 | |
| 66 | if not os.path.exists(config_path): |
| 67 | print(f"Warning: config file not found at {config_path}, using defaults") |
| 68 | return { |
| 69 | 'paths': { |
| 70 | 'input_dir': './input', |
| 71 | 'output_dir': './output', |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | with open(config_path, 'r', encoding='utf-8') as f: |
| 76 | return yaml.safe_load(f) |
| 77 | |
| 78 | |
| 79 | # ======================== pipeline ======================== |