diff --git a/src/clock.py b/src/clock.py index 140e9248..72b84177 100644 --- a/src/clock.py +++ b/src/clock.py @@ -2,8 +2,8 @@ import time from datetime import datetime import pytz from typing import Dict, Any -from config_manager import ConfigManager -from display_manager import DisplayManager +from src.config_manager import ConfigManager +from src.display_manager import DisplayManager class Clock: def __init__(self): diff --git a/src/config_manager.py b/src/config_manager.py index 9fe0e817..b0daf477 100644 --- a/src/config_manager.py +++ b/src/config_manager.py @@ -3,9 +3,14 @@ import os from typing import Dict, Any class ConfigManager: - def __init__(self, config_path: str = "../config/config.json", secrets_path: str = "../config/config_secrets.json"): - self.config_path = config_path - self.secrets_path = secrets_path + def __init__(self, config_path: str = None, secrets_path: str = None): + # Get the project root directory + project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + # Set default paths relative to project root + self.config_path = config_path or os.path.join(project_root, "config", "config.json") + self.secrets_path = secrets_path or os.path.join(project_root, "config", "config_secrets.json") + self.config: Dict[str, Any] = {} self.load_config()