Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ea0234d
initial functions to generate pipeline container config files
mirpedrol Dec 2, 2025
ae19574
generate all config files
mirpedrol Dec 2, 2025
ccc041b
regenerate container config files when modules install, remove, update
mirpedrol Dec 2, 2025
ad206e9
pass repo_path
mirpedrol Dec 2, 2025
fae9eba
add tests
mirpedrol Dec 2, 2025
1634f88
less lines
mirpedrol Dec 3, 2025
7dc3435
always update docker amd64
mirpedrol Dec 4, 2025
4688a9b
Update nf_core/pipelines/containers_utils.py
mirpedrol Dec 4, 2025
0868c8f
spaces
mirpedrol Dec 4, 2025
8772366
Apply suggestions from code review
mirpedrol Dec 15, 2025
140eaf6
fix types
mashehu Dec 15, 2025
9ccc121
inspect in json format and fix tests
mirpedrol Dec 16, 2025
52bcd8e
simplify functions, thanks @mashehu
mirpedrol Dec 16, 2025
342c90a
Update tests/pipelines/test_container_configs.py
mirpedrol Dec 17, 2025
c1ccc2e
remove too many warnings and add debug messages and one info summary …
mirpedrol Jan 13, 2026
eaeedcb
update arch names to make it consistent with modules container command
mashehu Jan 22, 2026
f28b861
parse the include statements to get modules paths from process names
mashehu Jan 22, 2026
9c39d10
sort generated config files
mashehu Jan 22, 2026
f9e507e
drop `linux_` prefix of arch in config file names
mashehu Jan 22, 2026
7693a23
Apply suggestions from code review
mashehu Mar 30, 2026
862e82e
add container configs to linting
mashehu Mar 9, 2026
085099c
remove unused argument
mashehu Mar 30, 2026
e9e6311
remove org from containerconfigs
mashehu Mar 30, 2026
aead8e7
update template modules to latest version
mashehu Mar 30, 2026
cb53b36
fix container config test
mashehu Mar 31, 2026
6c08b88
bump nextflow version to 25.10.4
mashehu Mar 31, 2026
b55504a
fix type warning
mashehu Apr 21, 2026
b675d24
fix ruff linting errors
mashehu Apr 22, 2026
50e58b0
update modules.json in tempalte
mashehu Apr 22, 2026
e449914
fix todo hint
mashehu Apr 22, 2026
2d96acf
add container config creation step to template rendering
mashehu Apr 22, 2026
39018d2
fix path to mock
mashehu Apr 22, 2026
ee84386
fix tests by actually removing file that is now generated with pipeli…
mashehu Apr 22, 2026
817ea79
more test fixes
mashehu Apr 22, 2026
713e7b4
move try_generate_container_configs to container_utils
mashehu Apr 23, 2026
ea65a14
use same PLATFORMS constant in containers_utils and tests
mashehu Apr 23, 2026
831cdb2
also regenerate container configs for patch commands
mashehu Apr 23, 2026
ef2edb2
clean up container configs before writing new ones, to keep state in …
mashehu Apr 23, 2026
5e9ae89
manually add newly installed module to container config generator
mashehu Apr 23, 2026
200571d
update fastqc and multiqc to latest version
mashehu Apr 24, 2026
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
2 changes: 1 addition & 1 deletion .github/snapshots/gpu.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.04.0"
"nextflow": "25.10.4"
},
"timestamp": "2025-06-16T14:29:10.076573"
}
Expand Down
5 changes: 5 additions & 0 deletions docs/api/_src/pipeline_lint_tests/container_configs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# container_configs

```{eval-rst}
.. automethod:: nf_core.pipelines.lint.PipelineLint.container_configs
```
1 change: 1 addition & 0 deletions docs/api/_src/pipeline_lint_tests/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [actions_nf_test](./actions_nf_test/)
- [actions_schema_validation](./actions_schema_validation/)
- [base_config](./base_config/)
- [container_configs](./container_configs/)
- [files_exist](./files_exist/)
- [files_unchanged](./files_unchanged/)
- [included_configs](./included_configs/)
Expand Down
7 changes: 6 additions & 1 deletion nf_core/components/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
)
from nf_core.modules.modules_json import ModulesJson
from nf_core.modules.modules_repo import ModulesRepo
from nf_core.pipelines.containers_utils import try_generate_container_configs

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -158,7 +159,7 @@ def install(self, component: str | dict[str, str], silent: bool = False) -> bool
if not self.install_component_files(component, version, self.modules_repo, install_folder):
return False

# Update module.json with newly installed subworkflow
# Update module.json with newly installed component
modules_json.load()
modules_json.update(
self.component_type, self.modules_repo, component, version, self.installed_by, install_track
Expand All @@ -168,6 +169,10 @@ def install(self, component: str | dict[str, str], silent: bool = False) -> bool
# Install included modules and subworkflows
self.install_included_components(component_dir)

# Regenerate container configuration files for the pipeline when modules are installed
if self.component_type == "modules":
try_generate_container_configs(self.directory, component_dir, component)

if not silent:
modules_json.load()
modules_json.dump(run_prettier=True)
Expand Down
10 changes: 9 additions & 1 deletion nf_core/components/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from nf_core.components.components_command import ComponentCommand
from nf_core.components.components_differ import ComponentsDiffer
from nf_core.modules.modules_json import ModulesJson
from nf_core.pipelines.containers_utils import try_generate_container_configs

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -118,7 +119,8 @@ def patch(self, component=None):
)

# Write the patch to a temporary location (otherwise it is printed to the screen later)
patch_temp_path = tempfile.mktemp()
with tempfile.NamedTemporaryFile(delete=False) as tmp:
patch_temp_path = tmp.name
try:
ComponentsDiffer.write_diff_file(
patch_temp_path,
Expand Down Expand Up @@ -156,13 +158,19 @@ def patch(self, component=None):
shutil.move(patch_temp_path, patch_path)
log.info(f"Patch file of '{component_fullname}' written to '{patch_path}'")

# Regenerate container configuration files for the pipeline when modules are removed
if self.component_type == "modules":
try_generate_container_configs(self.directory)

def remove(self, component):
# Check modules directory structure
self.check_modules_structure()

self.modules_json.check_up_to_date()
self._parameter_checks(component)
components = self.modules_json.get_all_components(self.component_type).get(self.modules_repo.remote_url)
if components is None:
raise ValueError(f"No components found for {self.component_type} in the pipeline")

if component is None:
self.require_prompts(
Expand Down
5 changes: 5 additions & 0 deletions nf_core/components/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import nf_core.utils
from nf_core.components.components_command import ComponentCommand
from nf_core.modules.modules_json import ModulesJson
from nf_core.pipelines.containers_utils import try_generate_container_configs

from .install import ComponentInstall

Expand Down Expand Up @@ -180,6 +181,10 @@ def remove(self, component, repo_url=None, repo_path=None, removed_by=None, remo
# remember removed dependencies
if dependency_removed:
removed_components.append(component_name.replace("/", "_"))
# Regenerate container configuration files for the pipeline when modules are removed
if self.component_type == "modules":
try_generate_container_configs(self.directory)

# print removed dependencies
dependencies = set(removed_components) - {component}
if dependencies:
Expand Down
5 changes: 5 additions & 0 deletions nf_core/components/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from nf_core.components.remove import ComponentRemove
from nf_core.modules.modules_json import ModulesJson
from nf_core.modules.modules_repo import ModulesRepo
from nf_core.pipelines.containers_utils import try_generate_container_configs
from nf_core.utils import plural_es, plural_s, plural_y

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -307,6 +308,10 @@ def update(self, component=None, silent=False, updated=None, check_diff_exist=Tr
# Update modules.json with newly installed component
self.modules_json.update(self.component_type, modules_repo, component, version, installed_by=None)
updated.append(component)

# Regenerate container configuration files for the pipeline when modules are updated
if self.component_type == "modules":
try_generate_container_configs(self.directory)
recursive_update = True
modules_to_update, subworkflows_to_update = self.get_components_to_update(component)
if not silent and len(modules_to_update + subworkflows_to_update) > 0 and not self.update_all:
Expand Down
4 changes: 2 additions & 2 deletions nf_core/pipeline-template/modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
{%- if fastqc %}
"fastqc": {
"branch": "master",
"git_sha": "3009f27c4e4b6e99da4eeebe82799e13924a4a1f",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
}{% endif %}{%- if multiqc %}{% if fastqc %},{% endif %}
"multiqc": {
"branch": "master",
"git_sha": "2c73cc8fa92cf48de3da0b643fdf357a8a290b36",
"git_sha": "008f9d3e61209bf995edac3ba531f54e269e1215",
"installed_by": ["modules"]
}
{%- endif %}
Expand Down
Loading
Loading