From e04909ebad4c9c8d20ba8613caa9859f047217c6 Mon Sep 17 00:00:00 2001 From: tpv Date: Tue, 30 Jun 2026 12:51:32 -0700 Subject: [PATCH] added claude folder and removed project root constant --- src/monitor_utils/config.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/monitor_utils/config.py b/src/monitor_utils/config.py index 450ae4e..ac380d6 100644 --- a/src/monitor_utils/config.py +++ b/src/monitor_utils/config.py @@ -27,14 +27,14 @@ def get_bot_token(is_production: bool) -> str: def get_config( - monitor_name: str, use_production_path: bool = False + monitor_name: str, + config_dir: str | pathlib.Path = "configs", + test_config_dir: str | pathlib.Path = "tests/configs", + use_production_path: bool = False, ) -> tuple[dict, pathlib.Path]: monitor_name = monitor_name.replace(".json", "") - if use_production_path: - config_path = PROJECT_ROOT / "configs" / f"{monitor_name}.json" - else: - config_path = PROJECT_ROOT / "tests" / "configs" / f"{monitor_name}.json" - + base = config_dir if use_production_path else test_config_dir + config_path = pathlib.Path(base) / f"{monitor_name}.json" with open(config_path) as f: return json.load(f), config_path