Skip to content

Commit

Permalink
Compatibility with Alab_one branch
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hrushikesh-s committed Feb 21, 2024
1 parent 62df60b commit 4ff2305
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions alab_management/utils/module_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,20 @@ 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):
dir_to_import_from = Path(dir_to_import_from)
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):
Expand Down

2 comments on commit 4ff2305

@bernardusrendy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hrushikesh-s I think we have to stash this change to a new feature branch because it is currently not passing the test.
Syncing with the new refactored alab_one means we have to change the integration tests to match the refactored alab_one if we are sure we want to structure the alab_management that way.

@bernardusrendy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is breaking the alab_one main currently

Please sign in to comment.