From 4ff23059e89292ef572f389ac484d3125ec33504 Mon Sep 17 00:00:00 2001 From: Hrushikesh Sahasrabuddhe Date: Wed, 21 Feb 2024 11:28:09 -0800 Subject: [PATCH] Compatibility with Alab_one branch The way to read the devices and tasks is modified a little to be in line with the refactoring changes that are made in Alab_one --- alab_management/utils/module_ops.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/alab_management/utils/module_ops.py b/alab_management/utils/module_ops.py index 36807a35..72f6216e 100644 --- a/alab_management/utils/module_ops.py +++ b/alab_management/utils/module_ops.py @@ -33,7 +33,8 @@ def load_definition(): config = AlabConfig() working_dir = config["general"]["working_dir"] - parent_package = config["general"].get("parent_package", None) + parent_package_devices = config["general"].get("parent_package_devices", None) + parent_package_tasks = config["general"].get("parent_package_tasks", None) dir_to_import_from = copy(working_dir) if os.path.isabs(dir_to_import_from): @@ -41,7 +42,11 @@ def load_definition(): else: dir_to_import_from = config.path.parent / dir_to_import_from - import_module_from_path(dir_to_import_from, parent_package) + print(f"import_module_from_path: {Path(dir_to_import_from, parent_package_devices)}") + import_module_from_path(dir_to_import_from, parent_package_devices) + + print(f"import_module_from_path: {Path(dir_to_import_from, parent_package_tasks)}") + import_module_from_path(dir_to_import_from, parent_package_tasks) # def import_device_definitions(file_folder: str, module_name: str):