Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/arduino/app_tools/module_listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def __init__(
self.path = fs_path
self.compose_file: Optional[str] = self.get_compose_file()
self.readme_file: Optional[str] = self.get_readme_file()
self.require_container: bool = self.compose_file is not None
self.model_name: str = model_name
self.require_model: bool = model_name != ""
self.category = category
Expand All @@ -65,7 +64,6 @@ def to_dict(self) -> dict:
"id": self.id,
"name": self.name,
"description": self.brick_description,
"require_container": self.require_container,
"require_model": self.require_model,
"mount_devices_into_container": self.mount_devices_into_container,
"ports": self.ports,
Expand Down Expand Up @@ -217,7 +215,7 @@ def list_installed_packages_pkg_resources() -> Dict[str, List[ArduinoBrick]]:

def save_compose_file(module: ArduinoBrick, output_dir: str, appslab_version: str):
"""Save the compose file to the specified output directory."""
if not module.require_container:
if module.compose_file is None:
return

# We cannot save a folder containing the `:`, therefore we split and save it
Expand Down Expand Up @@ -342,7 +340,7 @@ def release():
for module in module_list:
modules.append(module.to_dict())
# Update the compose file with the release version
if module.require_container:
if module.compose_file is not None:
print(f"Processing compose file {module.compose_file} for arduino bricks version {arduino_bricks_version}")
_update_compose_release_version(
compose_file_path=module.compose_file,
Expand Down Expand Up @@ -390,7 +388,7 @@ def update_ai_container_references():
for module in module_list:
modules.append(module.to_dict())
# Update the compose file with the release version
if module.require_container:
if module.compose_file is not None:
_update_compose_release_version(
compose_file_path=module.compose_file,
release_version=arduino_bricks_version,
Expand Down
Loading