From f0bf98f61389a516ad5f256367c43b0c8858846d Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 5 Dec 2023 17:04:24 +0100 Subject: [PATCH] WIP --- src/runner_manager.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/runner_manager.py diff --git a/src/runner_manager.py b/src/runner_manager.py new file mode 100644 index 0000000..25a890f --- /dev/null +++ b/src/runner_manager.py @@ -0,0 +1,28 @@ +# should replace static RUNNER_DICT +# WIP + +import importlib +from pathlib import Path +from typing import TYPE_CHECKING + +from icecream import ic + +if TYPE_CHECKING: + from src.env_manager import EnvFile, EnvManager + + +class RunnerManager: + def __init__(self, env_files: list["EnvFile"]): + pass + + root = Path("src") + ic(root.resolve()) + for module_path in root.rglob("*/runner*.py"): + module_path = module_path.as_posix().replace("/", ".").replace(".py", "") + ic(module_path) + module = importlib.import_module(module_path) + ic(dir(module)) + # exit() + + +# ic(RUNNER_DICT)