diff --git a/src/coordinator.py b/src/coordinator.py index 74e53fd..509aa3e 100644 --- a/src/coordinator.py +++ b/src/coordinator.py @@ -5,7 +5,8 @@ from loguru import logger from src.dir_manager import DirManager from src.env_manager import EnvFile, EnvManager from src.html_helper import merge_html_files -from src.runner import RUNNER_DICT, Runner +from src.runner import Runner +from src.runner_dict import RUNNER_DICT from src.utils import rmtree diff --git a/src/runner.py b/src/runner.py index 4a54b61..8ef444a 100644 --- a/src/runner.py +++ b/src/runner.py @@ -7,17 +7,6 @@ from dotenv import dotenv_values from loguru import logger from src.dir_manager import DirManager -from src.tests_authentik.runner_authentik import RunnerAuthentik -from src.tests_nextcloud.runner_nextcloud import RunnerNextcloud -from src.tests_wordpress.runner_wordpress import RunnerWordpress - -# Register all runners here. Each .env file with TYPE=authentik will be run with RunnerAuthentik - -RUNNER_DICT: dict[str, type["Runner"]] = { - "authentik": RunnerAuthentik, - "wordpress": RunnerWordpress, - "nextcloud": RunnerNextcloud, -} @dataclass diff --git a/src/runner_dict.py b/src/runner_dict.py new file mode 100644 index 0000000..5b000db --- /dev/null +++ b/src/runner_dict.py @@ -0,0 +1,16 @@ +from typing import TYPE_CHECKING + +from src.tests_authentik.runner_authentik import RunnerAuthentik +from src.tests_nextcloud.runner_nextcloud import RunnerNextcloud +from src.tests_wordpress.runner_wordpress import RunnerWordpress + +if TYPE_CHECKING: + from src.runner import Runner + +# Register all runners here. Each .env file with TYPE=authentik will be run with RunnerAuthentik + +RUNNER_DICT: dict[str, type["Runner"]] = { + "authentik": RunnerAuthentik, + "wordpress": RunnerWordpress, + "nextcloud": RunnerNextcloud, +}