More structure changes

More root structure changes to run easier from root folder
This commit is contained in:
Chuck
2025-04-07 21:08:07 -05:00
parent 4366ec9f37
commit faa644ef3f
2 changed files with 10 additions and 5 deletions

View File

@@ -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):

View File

@@ -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()