Source code for src.utilities


import yaml
from pathlib import Path
from typing import Optional
from colorama import Fore, Style

[docs] def load_config(config_file_path:str|Path='config/config.yaml'): """Load the configuration from the YAML file.""" config_file_path = Path(config_file_path) if not config_file_path.exists(): raise FileNotFoundError(f"Configuration file not found: {config_file_path}") else: print_update(level=1,message=f"Loading configuration from '{config_file_path}'") with open(config_file_path, 'r') as file: config = yaml.safe_load(file) return config