From 026a2936580bb2609102031b75e600c1d84624e7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 2 Dec 2023 15:24:58 +0100 Subject: [PATCH] wip _get_dependency_rules --- src/coordinator.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/coordinator.py b/src/coordinator.py index b0721c9..4e20a69 100644 --- a/src/coordinator.py +++ b/src/coordinator.py @@ -33,8 +33,10 @@ class Coordinator: self.session_id = session_id self.env_files: list[EnvFile] = self._parse_env_files(env_paths_list) + self._get_dependency_rules(self.env_files) - def _parse_env_files(self, env_paths: list[Path]) -> list[EnvFile]: + @staticmethod + def _parse_env_files(env_paths: list[Path]) -> list[EnvFile]: """Returns a list of EnvFile objects created from the given env files""" env_files: list[EnvFile] = [] for env_path in env_paths: @@ -45,6 +47,14 @@ class Coordinator: env_files.append(EnvFile(env_path=env_path, config=config, env_type=env_type)) return env_files + def _get_dependency_rules(self, env_files: list[EnvFile]): + for env_file in env_files: + child_runner_class = RUNNER_DICT[env_file.env_type] + print(child_runner_class.name) + for dependency in child_runner_class.dependencies: + print("dependency", dependency.name) + exit() + def setup_test(self): logger.info("calling setup_test()") self.DIR.create_all_dirs()