From 903327a958f936dba99fceb6b89fff3a4c15417c Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 17 Aug 2026 14:47:54 +0200 Subject: [PATCH 1/4] Remove redundant ext.use_gpu from process_gpu label in template The accelerator directive now fully covers GPU scheduling, making the ext.use_gpu flag unnecessary. --- nf_core/pipeline-template/conf/base.config | 1 - tests/data/mock_pipeline_containers/conf/base.config | 1 - 2 files changed, 2 deletions(-) diff --git a/nf_core/pipeline-template/conf/base.config b/nf_core/pipeline-template/conf/base.config index 4d9519d8fd..691d8b1d77 100644 --- a/nf_core/pipeline-template/conf/base.config +++ b/nf_core/pipeline-template/conf/base.config @@ -63,7 +63,6 @@ process { maxRetries = 2 } withLabel: process_gpu { - ext.use_gpu = { workflow.profile.contains('gpu') } accelerator = { workflow.profile.contains('gpu') ? 1 : null } } } diff --git a/tests/data/mock_pipeline_containers/conf/base.config b/tests/data/mock_pipeline_containers/conf/base.config index a87a26956d..358d83a1ba 100644 --- a/tests/data/mock_pipeline_containers/conf/base.config +++ b/tests/data/mock_pipeline_containers/conf/base.config @@ -60,7 +60,6 @@ process { maxRetries = 2 } withLabel: process_gpu { - ext.use_gpu = { workflow.profile.contains('gpu') } accelerator = { workflow.profile.contains('gpu') ? 1 : null } } } From 47d2e38d85f7bb680c2e8982896646dbde00d49e Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 17 Aug 2026 14:50:23 +0200 Subject: [PATCH 2/4] Remove ext.use_gpu from permitted ext keys in module linting ext.use_gpu is superseded by task.accelerator, so modules using it should now fail the ext key lint check like any other unrecognized key. --- nf_core/modules/lint/main_nf.py | 2 +- tests/modules/lint/test_main_nf.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nf_core/modules/lint/main_nf.py b/nf_core/modules/lint/main_nf.py index 699de45abe..c38b7718ef 100644 --- a/nf_core/modules/lint/main_nf.py +++ b/nf_core/modules/lint/main_nf.py @@ -409,7 +409,7 @@ def check_script_section(self, lines): ) # Validate ext keys - permitted_ext_keys = {"ext.args", "ext.prefix", "ext.prefix2", "ext.use_gpu"} + permitted_ext_keys = {"ext.args", "ext.prefix", "ext.prefix2"} invalid_ext_keys = [ key for key in re.findall(r"\bext\.\w+", script) diff --git a/tests/modules/lint/test_main_nf.py b/tests/modules/lint/test_main_nf.py index 1663a2cc7f..1df6ac9e20 100644 --- a/tests/modules/lint/test_main_nf.py +++ b/tests/modules/lint/test_main_nf.py @@ -1250,7 +1250,6 @@ def args2 = task.ext.args2 ?: '' def args3 = task.ext.args3 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def prefix2 = task.ext.prefix2 ?: '' - def use_gpu = task.ext.use_gpu ? '--gpu' : '' """ ], ) @@ -1268,6 +1267,7 @@ def suffix = task.ext.suffix ?: '.bam' def prefix1 = task.ext.prefix1 ?: '' def prefix3 = task.ext.prefix3 ?: '' def prefix22 = task.ext.prefix22 ?: '' + def use_gpu = task.ext.use_gpu ? '--gpu' : '' """ ], ) @@ -1278,6 +1278,7 @@ def prefix22 = task.ext.prefix22 ?: '' assert "ext.prefix1" in mock_lint.failed[0][2] assert "ext.prefix3" in mock_lint.failed[0][2] assert "ext.prefix22" in mock_lint.failed[0][2] + assert "ext.use_gpu" in mock_lint.failed[0][2] # ext.argsN where N >= 2 should be valid mock_lint.passed, mock_lint.failed = [], [] From 03a164283d55c1089c425430ca318aa683bb29dd Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 17 Aug 2026 14:50:41 +0200 Subject: [PATCH 3/4] Update gpu feature help text to reflect accelerator directive The description referenced a nonexistent use_gpu parameter instead of the process_gpu label and accelerator directive the feature generates. --- nf_core/pipelines/create/template_features.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipelines/create/template_features.yml b/nf_core/pipelines/create/template_features.yml index eedd517933..f6b11399e9 100644 --- a/nf_core/pipelines/create/template_features.yml +++ b/nf_core/pipelines/create/template_features.yml @@ -385,7 +385,7 @@ configurations: short_description: "Use GPU" description: "Add GPU support to the pipeline" help_text: | - This will add GPU support to the pipeline. It will add a `use_gpu` parameter to the pipeline. + This will add GPU support to the pipeline via the `process_gpu` label, using the `accelerator` directive. The pipeline will be able to run on GPU-enabled compute environments. nfcore_pipelines: True custom_pipelines: True From bad1dded7ca3a2a4a2f1a5dad7b9d683db7de5ea Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 17 Aug 2026 15:03:57 +0200 Subject: [PATCH 4/4] Add v4.1.1dev changelog section with ext.use_gpu removal entries No dev-version bump PR has run since the 4.1.0 release, so the changelog automation's expected running section didn't exist yet. --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61ba31f6f7..7653a8b5bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # nf-core/tools: Changelog +## v4.1.1dev + +### General + +### Linting + +- remove `ext.use_gpu` as a permitted ext key, superseded by `task.accelerator` ([#4445](https://github.com/nf-core/tools/pull/4445)) + +### Modules + +### Subworkflows + +### Template + +- remove redundant `ext.use_gpu` from the `process_gpu` label, use `accelerator` only ([#4445](https://github.com/nf-core/tools/pull/4445)) + +#### Version updates + ## [v4.1.0 - Marshalled Mamba](https://github.com/nf-core/tools/releases/tag/4.1.0) - [2026-07-29] ### General