Skip to content
Draft
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
cb07e9d
WIP: Start working on wave commands: Add command dummies.
JulianFlesch Dec 2, 2025
aa40d8b
[automated] Update CHANGELOG.md
nf-core-bot Dec 2, 2025
6b73c3c
added architecture
ningyuxin1999 Dec 2, 2025
5819387
Merge branch 'dev' into feature/3952-create-waveyml
ningyuxin1999 Dec 2, 2025
e689754
wire commands with functions
ningyuxin1999 Dec 2, 2025
c8873db
Merge branch 'feature/3952-create-waveyml' of https://github.com/Juli…
ningyuxin1999 Dec 2, 2025
8328f6f
containers obj
ningyuxin1999 Dec 2, 2025
6fba8ae
Merge branch 'dev' into feature/3952-create-waveyml
ningyuxin1999 Dec 3, 2025
78358ae
Update resolve module_dir. Change to using ValueError
JulianFlesch Dec 3, 2025
4493cad
Add TODOs
JulianFlesch Dec 3, 2025
1915c15
WIP: add container listing
JulianFlesch Dec 3, 2025
109d0b8
Move container constants to global utils.
JulianFlesch Dec 3, 2025
e723d5b
Use constants from global utils. Change list_containers to return lis…
JulianFlesch Dec 3, 2025
f44757b
add dry-run to the containers create, fixed the uitls import and modu…
ningyuxin1999 Dec 3, 2025
7c369a4
Add contextmanager that extends set_wd but changes into a tempdir
JulianFlesch Dec 4, 2025
81ddaf8
Add extracting container string from a module main.nf
JulianFlesch Dec 4, 2025
882ed67
Rename method to match field name
JulianFlesch Dec 4, 2025
aa9fa01
Print container info as richt table
JulianFlesch Dec 4, 2025
3e119a4
Merge branch 'feature/3952-create-waveyml' of github.com:JulianFlesch…
JulianFlesch Dec 4, 2025
11228d4
Move calling wave to ModuleContainers class. Finish create method and…
JulianFlesch Dec 4, 2025
c08a6dd
Fix output encoding
JulianFlesch Dec 4, 2025
c6e8360
Remove comment
JulianFlesch Dec 4, 2025
4317977
Add TODOs
JulianFlesch Dec 4, 2025
e1d7f7d
buildid and scanid saved to the dict
ningyuxin1999 Dec 5, 2025
6cd3380
Merge branch 'feature/3952-create-waveyml' of github.com:JulianFlesch…
JulianFlesch Dec 5, 2025
180287e
meta yaml
ningyuxin1999 Dec 5, 2025
d6e744f
Update calling wave command to get buildId/scanId. Only add to outpu …
JulianFlesch Dec 5, 2025
ad5463c
Simplify create method
JulianFlesch Dec 5, 2025
e0edf97
Refactor to reuse key constants.
JulianFlesch Dec 5, 2025
141c2b8
Add conda-lock information to containers dict
JulianFlesch Dec 5, 2025
972cd5e
Fix space in url
JulianFlesch Dec 5, 2025
78bd273
Implement conda lock functions. Do not fail in containers_from_meta i…
JulianFlesch Dec 5, 2025
ad640fa
Simplify class
JulianFlesch Dec 5, 2025
9b821e7
Implement updating meta - WIP: sorting
JulianFlesch Dec 5, 2025
f117fca
Fix ModuleContainers initialisation
JulianFlesch Dec 5, 2025
d0f42cc
Fix expected meta.yml path
JulianFlesch Dec 5, 2025
3ccd190
Update containers in meta.yml - WIP: sorting
JulianFlesch Dec 5, 2025
cf1dcfa
update container from meta method
JulianFlesch Dec 5, 2025
76c64f2
Review: Rename conda lock methods
JulianFlesch Dec 8, 2025
6a69fb2
Fix typo
JulianFlesch Dec 8, 2025
ff23c7d
Update nf_core/modules/containers.py
JulianFlesch Dec 8, 2025
b7e5102
Review command: Remove dry_run flag for module container creation#
JulianFlesch Dec 8, 2025
2fa3538
remove unnecessary string casting
JulianFlesch Dec 8, 2025
af97d90
Review comment: Remove extra loop for conda-lock files
JulianFlesch Dec 8, 2025
77e263e
Merge
JulianFlesch Dec 8, 2025
8f3bfb1
Make wave container requests run concurrently
JulianFlesch Dec 8, 2025
3221030
fix gathering concurrent results
JulianFlesch Dec 8, 2025
6aca629
fix building conda section
JulianFlesch Dec 8, 2025
69b6424
Remove threads option.
JulianFlesch Dec 8, 2025
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
25 changes: 18 additions & 7 deletions nf_core/modules/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class ModuleContainers:
Helpers for building, linting and listing module containers.
"""

IMAGE_KEY = "name"
BUILD_ID_KEY = "buildId"
SCAN_ID_KEY = "scanId"
Comment on lines +19 to +21
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think any of these will change in the future. clearer if we just use them as strings in the code I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you don't feel strongly about this, I think we should keep them. They only exist in the class scope, close to where they are being used, but there we use them quite a lot as it helps us to not have redundant literals


def __init__(
self,
directory: str | Path = ".",
Expand Down Expand Up @@ -41,12 +45,19 @@ def create(self, module: str, await_: bool = False, dry_run: bool = False) -> di
for platform in CONTAINER_PLATFORMS:
containers[cs][platform] = self.request_container(cs, platform, env_path, await_, dry_run)

for platform in CONTAINER_PLATFORMS:
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to loop twice over container_platforms?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it makes it more readable what's being done with being less nested and clearly separated. But for comparing, applied your suggestion in af97d90

build_id = containers.get("docker", dict()).get(platform, dict()).get(self.BUILD_ID_KEY, "")
if build_id:
# TODO: Add conda-lock url for platform based on the build_id for docker and the same platform
pass
# containers["conda"].update(dict((platform, dict(()))))

self.containers = containers
return containers

@staticmethod
@classmethod
def request_container(
container_system: str, platform: str, conda_file: Path, await_build=False, dry_run=False
cls, container_system: str, platform: str, conda_file: Path, await_build=False, dry_run=False
) -> dict:
assert conda_file.exists()
assert container_system in CONTAINER_SYSTEMS
Expand Down Expand Up @@ -78,15 +89,15 @@ def request_container(
if not image:
raise RuntimeError(f"Wave build ({container_system} {platform}) did not return a image name")

container["name"] = image
container[cls.IMAGE_KEY] = image

build_id = meta_data.get("buildId", "")
build_id = meta_data.get(cls.BUILD_ID_KEY, "")
if build_id:
container["buildId"] = build_id
container[cls.BUILD_ID_KEY] = build_id

scan_id = meta_data.get("scanId", "")
scan_id = meta_data.get(cls.SCAN_ID_KEY, "")
if scan_id:
container["scanId"] = scan_id
container[cls.SCAN_ID_KEY] = scan_id

return container

Expand Down