Skip to content

chore: nf-core 4.0.2 template sync - #77

Merged
ypriverol merged 6 commits into
devfrom
template-sync-4.0.2
May 2, 2026
Merged

ypriverol merged 6 commits into
devfrom
template-sync-4.0.2

Conversation

@ypriverol

@ypriverol ypriverol commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

This pull request introduces several improvements to the development environment, updates to GitHub Actions for better reliability and maintainability, and minor documentation and configuration tweaks. The most notable changes are the addition of a devcontainer for streamlined development, updates to CI/CD workflows and actions, and some documentation clean-up.

Development Environment Enhancements:

  • Added a new .devcontainer/devcontainer.json file to support GitHub Codespaces and local devcontainers, specifying the environment image, user, resource requirements, and a setup script for initializing the environment.
  • Introduced .devcontainer/setup.sh to customize the terminal prompt, update Nextflow, and display a welcome message for devcontainer users.

CI/CD and GitHub Actions Updates:

  • Updated GitHub Actions to use newer, pinned versions of key actions (such as Nextflow, nf-test, apptainer, setup-miniconda, and add-pr-comment) for improved security and reproducibility. [1] [2] [3] [4]
  • Enhanced the custom get-shards and nf-test actions to accept new inputs (like paths), improved error handling, and updated to use the latest action versions. [1] [2] [3] [4]

Documentation and Configuration Clean-up:

  • Removed the outdated .github/CONTRIBUTING.md in favor of referencing documentation in the docs/ directory.
  • Updated links in .github/PULL_REQUEST_TEMPLATE.md to point to the new location of the contributing documentation.
  • Fixed a Slack channel reference in .github/ISSUE_TEMPLATE/config.yml to the correct #quantmsdiann channel.
  • Fixed a casing issue in .github/.dockstore.yml for the workflow subclass.

These changes collectively enhance the developer experience, improve CI reliability, and ensure documentation and configuration are up to date.## Summary

Brings bigbio/quantmsdiann template scaffolding to nf-core/tools 4.0.2 without ever doing git merge TEMPLATE — a regular three-way merge in this repo silently deletes 36 project files (workflows/dia.nf, modules/local/diann/*, lib/BlockedFlags.groovy, conf/diann_versions/*, subworkflows/local/input_check/, …) because the TEMPLATE branch accumulated project commits and the merge-base contains project files. We instead cherry-picked template files by hand.

Two commits:

  • d71d60c Phase 1 — infrastructure only. Manifest nextflowVersion → !>=25.10.4; .devcontainer/, .vscode/settings.json, tower.yml; new CI workflows download_pipeline.yml and nf-test.yml; .github/workflows/* and .github/actions/* action-version bumps + pre-commit → prek switch; nf-core/utils_* subworkflows refreshed; .pre-commit-config.yaml (prettier 3.8.3, new nf-lint hook), .nf-core.yml (3.5.2 → 4.0.2); hybrid .gitignore (kept project entries, added .lineage/) and .prettierignore (TEMPLATE base + project SKILL.md / AGENTS.md).
  • 48df483 Phase 2a — lint fixes & badge/link consistency. Move CONTRIBUTING.md to docs/ (4.0.2 convention) and add a quantmsdiann-specific section. Update modules.json SHAs for utils_nfcore_pipeline and utils_nfschema_plugin (matches refreshed file content; fixes check_local_copy). Remove subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml (4.0.2 drops meta.yml for local subworkflows; fixes meta_name). Bump nf-core template badge 3.5.2 → 4.0.2 in README.md and ro-crate-metadata.json, fix the now-broken CONTRIBUTING.md link (was .github/, now docs/), refresh Nextflow badge to ≥25.10.4, tighten pipeline description.

Zero project source files touched — no diff to workflows/, modules/local/, modules/bigbio/, subworkflows/local/{create_input_channel,file_preparation,input_check}/, conf/diann_versions/, conf/tests/, conf/modules/, conf/pride_codon_slurm.config, lib/, bin/, assets/sdrf*.

Accepted lint warnings (not fixed)

  • main_nf_script_outputs on PIPELINE_COMPLETION — completion workflow legitimately has no outputs (side-effect only). TEMPLATE avoids the warning by also defining PIPELINE_INITIALISATION in the same file; adopting that pattern requires adapting it to quantmsdiann's SDRF input — Phase 2 work, not in scope here.
  • main_nf_include on subworkflows/local/input_check and subworkflows/local/create_input_channel — both are single-module wrappers. INPUT_CHECK is a well-known nf-core convention name; CREATE_INPUT_CHANNEL carries the runtime enum guard for --local_input_type. Cosmetic warning, abstractions stay.

Test plan

  • nf-core pipelines lint clean except the two accepted warnings noted above
  • nf-core pipelines schema lint
  • prek run --all-files (or pre-commit run --all-files)
  • nextflow run . -profile test_dia,docker --outdir results-validation smoke test
  • CI passes: nf-test, linting, download_pipeline, plus existing ci/merge_ci/extended_ci

Out of scope (Phase 2b — separate PR)

Manual review of files where template structure and project content intermingle: nextflow_schema.json, main.nf, workflows/quantmsdiann.nf, assets/multiqc_config.yml, conf/base.config, nf-test.config, tests/*, docs/{output.md,usage.md,README.md}, plus the subworkflows/local/utils_nfcore_quantms_pipeline → utils_nfcore_quantmsdiann_pipeline rename and the PIPELINE_INITIALISATION workflow adoption.

ypriverol added 2 commits May 1, 2026 14:30
Manual targeted update instead of `git merge TEMPLATE`. The TEMPLATE
branch in this repo accumulated project commits, so the merge-base
contains project files; a three-way merge silently deletes them
(workflows/dia.nf, modules/local/diann/*, lib/BlockedFlags.groovy,
conf/diann_versions/*, etc.). Cherry-picking template files by hand
avoids that trap.

Phase 1 — low-risk, template-only:

- Bump nextflowVersion to !>=25.10.4 in nextflow.config manifest
- Add new template CI: .github/workflows/{nf-test,download_pipeline}.yml
- Add .devcontainer/, .vscode/settings.json, tower.yml
- Update .github/workflows/* (branch, clean-up, fix_linting, linting,
  linting_comment, template-version-comment) and .github/actions/*
  (get-shards, nf-test) to 4.0.2 versions: action pin bumps, switch
  from pre-commit to prek for linting, add `paths` input to nf-test
  composite actions
- Update .github/.dockstore.yml (NFL → nfl), ISSUE_TEMPLATE config
  (slack channel quantms → quantmsdiann), PULL_REQUEST_TEMPLATE
  (CONTRIBUTING.md path)
- Update subworkflows/nf-core/utils_* to 4.0.2 (emit syntax fix,
  imNotification removed, params.help handling, nf-schema 2.6.1,
  new utils_nfcore_pipeline tests)
- Update .pre-commit-config.yaml (prettier 3.8.3, nf-lint hook),
  .nf-core.yml (3.5.2 → 4.0.2)
- Hybrid .gitignore: keep project entries, add .lineage/
- Hybrid .prettierignore: TEMPLATE baseline + project SKILL.md/AGENTS.md

No project source files (workflows/, modules/local/, conf/diann_versions/,
conf/tests/, lib/, subworkflows/local/) touched.
Follow-up to Phase 1 (d71d60c) addressing nf-core 4.0.2 lint warnings
introduced or surfaced by the template sync.

- Move CONTRIBUTING.md from .github/ to docs/ (4.0.2 convention; PR
  template already references the new path) and add a quantmsdiann-
  specific section covering DIA-NN version handling, SDRF inputs, the
  local-modules layout, and the test-profile reference table
- Update modules.json SHAs for the two nf-core utility subworkflows
  whose files were refreshed in Phase 1: utils_nfcore_pipeline →
  a3fb7351, utils_nfschema_plugin → fdc08b8b (matches what TEMPLATE
  records, fixes check_local_copy lint)
- Remove subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml —
  4.0.2 convention drops meta.yml for local subworkflows (fixes
  meta_name lint warning)
- README.md / ro-crate-metadata.json: bump nf-core template badge
  3.5.2 → 4.0.2, fix CONTRIBUTING.md links to point at docs/, refresh
  Nextflow badge ≥25.10.4 to match the manifest, and tighten the
  pipeline description (DIA-NN 2.3.2 row, plexDIA / Bruker mention,
  test-profile quickstart, sdrf-pipelines / pmultiqc citations)

The remaining lint hits (main_nf_script_outputs on PIPELINE_COMPLETION,
main_nf_include on the single-module input_check / create_input_channel
wrappers) are intentional design choices and accepted as warnings — see
PR description.
@coderabbitai

coderabbitai Bot commented May 1, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2f8a923b-4355-46d9-9642-9bdbad3b158a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch template-sync-4.0.2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Sync bigbio/quantmsdiann to nf-core 4.0.2 template (phase 1 + 2a)

✨ Enhancement 📝 Documentation

Grey Divider

Walkthroughs

Description
• Sync pipeline to nf-core template 4.0.2 infrastructure
• Update CI workflows with new nf-test and download_pipeline jobs
• Move CONTRIBUTING.md to docs/ and expand with pipeline-specific guidelines
• Bump Nextflow requirement to >=25.10.4 and update action versions
• Refresh nf-core subworkflows and update module SHAs
Diagram
flowchart LR
  A["nf-core 4.0.2<br/>Template"] -->|"Infrastructure<br/>Phase 1"| B["CI/CD Workflows<br/>Actions Updated"]
  A -->|"Infrastructure<br/>Phase 1"| C["Dev Environment<br/>.devcontainer"]
  A -->|"Infrastructure<br/>Phase 1"| D["Config Files<br/>Updated"]
  B -->|"New Jobs"| E["nf-test.yml<br/>download_pipeline.yml"]
  D -->|"Version Bumps"| F["Nextflow >=25.10.4<br/>nf-core 4.0.2"]
  G["Project Files"] -->|"Phase 2a<br/>Lint Fixes"| H["CONTRIBUTING.md<br/>Moved to docs/"]
  G -->|"Phase 2a<br/>Badge Updates"| I["README.md<br/>ro-crate-metadata.json"]
  H -->|"Enhanced with"| J["Pipeline-specific<br/>Guidelines"]
  F -->|"Subworkflows"| K["utils_nfcore_pipeline<br/>utils_nfschema_plugin"]
Loading

Grey Divider

File Changes

1. .devcontainer/devcontainer.json ⚙️ Configuration changes +21/-0

Add devcontainer configuration for GitHub Codespaces

.devcontainer/devcontainer.json


2. .devcontainer/setup.sh ⚙️ Configuration changes +13/-0

Add devcontainer setup script with Nextflow initialization

.devcontainer/setup.sh


3. .github/.dockstore.yml 🐞 Bug fix +1/-1

Update Dockstore workflow subclass from NFL to nfl

.github/.dockstore.yml


View more (28)
4. .github/CONTRIBUTING.md 📝 Documentation +0/-125

Remove old contributing guidelines from .github/

.github/CONTRIBUTING.md


5. .github/ISSUE_TEMPLATE/config.yml ⚙️ Configuration changes +2/-2

Update Slack channel reference from quantms to quantmsdiann

.github/ISSUE_TEMPLATE/config.yml


6. .github/PULL_REQUEST_TEMPLATE.md 📝 Documentation +2/-3

Update CONTRIBUTING.md link path to docs/ directory

.github/PULL_REQUEST_TEMPLATE.md


7. .github/actions/get-shards/action.yml ✨ Enhancement +7/-5

Add paths input and update nf-test action version

.github/actions/get-shards/action.yml


8. .github/actions/nf-test/action.yml ✨ Enhancement +9/-7

Update action versions and Python to 3.14, add paths input

.github/actions/nf-test/action.yml


9. .github/workflows/branch.yml ✨ Enhancement +2/-2

Update add-pr-comment action version and fix typo

.github/workflows/branch.yml


10. .github/workflows/clean-up.yml ✨ Enhancement +1/-1

Update actions/stale action to latest version

.github/workflows/clean-up.yml


11. .github/workflows/download_pipeline.yml ✨ Enhancement +142/-0

Add new workflow for testing pipeline download functionality

.github/workflows/download_pipeline.yml


12. .github/workflows/fix_linting.yml ✨ Enhancement +14/-23

Switch from pre-commit to prek linting tool

.github/workflows/fix_linting.yml


13. .github/workflows/linting.yml ✨ Enhancement +16/-20

Replace pre-commit with prek and update action versions

.github/workflows/linting.yml


14. .github/workflows/linting_comment.yml ✨ Enhancement +3/-17

Simplify PR number extraction and update action versions

.github/workflows/linting_comment.yml


15. .github/workflows/nf-test.yml ✨ Enhancement +141/-0

Add comprehensive nf-test workflow with sharding and matrix

.github/workflows/nf-test.yml


16. .github/workflows/template-version-comment.yml ✨ Enhancement +3/-3

Update action versions and documentation link

.github/workflows/template-version-comment.yml


17. .nf-core.yml ⚙️ Configuration changes +1/-1

Bump nf-core template version from 3.5.2 to 4.0.2

.nf-core.yml


18. .pre-commit-config.yaml ✨ Enhancement +11/-5

Update prettier version and add nf-lint pre-commit hook

.pre-commit-config.yaml


19. .prettierignore ⚙️ Configuration changes +1/-4

Simplify ignore patterns and fix AGENTS.md filename

.prettierignore


20. .vscode/settings.json ⚙️ Configuration changes +3/-0

Add VS Code markdown styling configuration

.vscode/settings.json


21. README.md 📝 Documentation +3/-3

Update Nextflow and template badges, fix CONTRIBUTING link

README.md


22. docs/CONTRIBUTING.md 📝 Documentation +208/-0

Add comprehensive contributing guidelines with pipeline-specific sections

docs/CONTRIBUTING.md


23. modules.json ⚙️ Configuration changes +6/-14

Update nf-core subworkflow SHAs and formatting

modules.json


24. nextflow.config ⚙️ Configuration changes +1/-1

Bump minimum Nextflow version requirement to >=25.10.4

nextflow.config


25. ro-crate-metadata.json 📝 Documentation +1/-1

Update template version badges and pipeline description

ro-crate-metadata.json


26. subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml 🐞 Bug fix +0/-32

Remove meta.yml for local subworkflow per 4.0.2 convention

subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml


27. subworkflows/nf-core/utils_nfcore_pipeline/main.nf 🐞 Bug fix +1/-65

Fix emit syntax and remove imNotification function

subworkflows/nf-core/utils_nfcore_pipeline/main.nf


28. subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test 🧪 Tests +29/-0

Add nf-test unit tests for utils_nfcore_pipeline workflow

subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test


29. subworkflows/nf-core/utils_nfschema_plugin/main.nf 🐞 Bug fix +1/-1

Fix help parameter string comparison logic

subworkflows/nf-core/utils_nfschema_plugin/main.nf


30. subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config ✨ Enhancement +1/-1

Update nf-schema plugin version to 2.6.1

subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config


31. tower.yml ⚙️ Configuration changes +5/-0

Add Tower.nf reports configuration for pipeline outputs

tower.yml


Grey Divider

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented May 1, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (5) 📘 Rule violations (1)

Grey Divider


Action required

1. nf-test uses double quotes 📘 Rule violation ⚙ Maintainability
Description
The newly added nf-test workflow file uses double-quoted strings (e.g., name "...", `script
"..."`) without interpolation, violating the documented Groovy/Nextflow style requirement. This
reduces consistency across the DSL/Groovy codebase.
Code

subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test[R3-10]

+    name "Test Workflow UTILS_NFCORE_PIPELINE"
+    script "../main.nf"
+    config "subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config"
+    workflow "UTILS_NFCORE_PIPELINE"
+    tag "subworkflows"
+    tag "subworkflows_nfcore"
+    tag "utils_nfcore_pipeline"
+    tag "subworkflows/utils_nfcore_pipeline"
Evidence
PR Compliance ID 7 requires single-quoted strings unless interpolation is needed; the added nf-test
Groovy DSL contains multiple double-quoted string literals without interpolation.

AGENTS.md
subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test[3-10]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
New nf-test Groovy/Nextflow DSL uses double-quoted strings without interpolation.

## Issue Context
Repo style requires single-quoted strings unless interpolation is needed.

## Fix Focus Areas
- subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test[3-10]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Missing imNotification function 🐞 Bug ≡ Correctness
Description
imNotification is still imported and called by the pipeline completion subworkflow, but it no
longer exists in utils_nfcore_pipeline, causing Nextflow compilation to fail before the pipeline
can run.
Code

subworkflows/nf-core/utils_nfcore_pipeline/main.nf[L360-419]

-def imNotification(summary_params, hook_url) {
-    def summary = [:]
-    summary_params
-        .keySet()
-        .sort()
-        .each { group ->
-            summary << summary_params[group]
-        }
-
-    def misc_fields = [:]
-    misc_fields['start']          = workflow.start
-    misc_fields['complete']       = workflow.complete
-    misc_fields['scriptfile']     = workflow.scriptFile
-    misc_fields['scriptid']       = workflow.scriptId
-    if (workflow.repository) {
-        misc_fields['repository'] = workflow.repository
-    }
-    if (workflow.commitId) {
-        misc_fields['commitid']   = workflow.commitId
-    }
-    if (workflow.revision) {
-        misc_fields['revision']   = workflow.revision
-    }
-    misc_fields['nxf_version']    = workflow.nextflow.version
-    misc_fields['nxf_build']      = workflow.nextflow.build
-    misc_fields['nxf_timestamp']  = workflow.nextflow.timestamp
-
-    def msg_fields = [:]
-    msg_fields['version']      = getWorkflowVersion()
-    msg_fields['runName']      = workflow.runName
-    msg_fields['success']      = workflow.success
-    msg_fields['dateComplete'] = workflow.complete
-    msg_fields['duration']     = workflow.duration
-    msg_fields['exitStatus']   = workflow.exitStatus
-    msg_fields['errorMessage'] = (workflow.errorMessage ?: 'None')
-    msg_fields['errorReport']  = (workflow.errorReport ?: 'None')
-    msg_fields['commandLine']  = workflow.commandLine.replaceFirst(/ +--hook_url +[^ ]+/, "")
-    msg_fields['projectDir']   = workflow.projectDir
-    msg_fields['summary']      = summary << misc_fields
-
-    // Render the JSON template
-    def engine       = new groovy.text.GStringTemplateEngine()
-    // Different JSON depending on the service provider
-    // Defaults to "Adaptive Cards" (https://adaptivecards.io), except Slack which has its own format
-    def json_path     = hook_url.contains("hooks.slack.com") ? "slackreport.json" : "adaptivecard.json"
-    def hf            = new File("${workflow.projectDir}/assets/${json_path}")
-    def json_template = engine.createTemplate(hf).make(msg_fields)
-    def json_message  = json_template.toString()
-
-    // POST
-    def post = new URL(hook_url).openConnection()
-    post.setRequestMethod("POST")
-    post.setDoOutput(true)
-    post.setRequestProperty("Content-Type", "application/json")
-    post.getOutputStream().write(json_message.getBytes("UTF-8"))
-    def postRC = post.getResponseCode()
-    if (!postRC.equals(200)) {
-        log.warn(post.getErrorStream().getText())
-    }
-}
Evidence
The local pipeline completion subworkflow imports and calls imNotification, but the synced
utils_nfcore_pipeline/main.nf no longer defines it (file ends after completionSummary). This
breaks module resolution at parse/compile time.

subworkflows/local/utils_nfcore_quantms_pipeline/main.nf[11-16]
subworkflows/local/utils_nfcore_quantms_pipeline/main.nf[60-63]
subworkflows/nf-core/utils_nfcore_pipeline/main.nf[341-355]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`subworkflows/local/utils_nfcore_quantms_pipeline/main.nf` imports and calls `imNotification`, but the synced `subworkflows/nf-core/utils_nfcore_pipeline/main.nf` no longer defines it, causing Nextflow compilation to fail.

### Issue Context
This is a template-sync regression: nf-core 4.0.2 dropped `imNotification`, but the project-specific completion subworkflow still expects it.

### Fix Focus Areas
- subworkflows/local/utils_nfcore_quantms_pipeline/main.nf[11-16]
- subworkflows/local/utils_nfcore_quantms_pipeline/main.nf[60-63]
- subworkflows/nf-core/utils_nfcore_pipeline/main.nf[341-355]

### Expected fix
Choose one:
1) Re-introduce `imNotification(summary_params, hook_url)` (and any required assets usage) in `utils_nfcore_pipeline/main.nf`, or
2) Remove the `include { imNotification ... }` and the call site from the local pipeline completion logic (and deprecate `hook_url` if no longer supported).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. nf-test required input missing 🐞 Bug ≡ Correctness
Description
The composite action .github/actions/nf-test declares a required paths input, but
.github/workflows/nf-test.yml never supplies it, so GitHub Actions will fail the step before
running any tests.
Code

.github/actions/nf-test/action.yml[R13-15]

+  paths:
+    description: "Test paths"
+    required: true
Evidence
paths is marked required in the action metadata, but the workflow invocation provides only
profile, shard, and total_shards. GitHub Actions enforces required inputs at runtime and will
error immediately.

.github/actions/nf-test/action.yml[3-16]
.github/workflows/nf-test.yml[85-101]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The nf-test composite action requires `inputs.paths`, but the caller does not provide it, causing CI failure.

### Issue Context
The action also currently doesn’t use `paths` in its `nf-test test` command, so requiring it is inconsistent.

### Fix Focus Areas
- .github/actions/nf-test/action.yml[13-15]
- .github/workflows/nf-test.yml[90-101]

### Expected fix
Either:
- Change `paths.required` to `false` (and/or remove the input entirely if unused), **or**
- Pass a `paths` value from `.github/workflows/nf-test.yml` and update the action implementation to actually filter tests by those paths (if intended).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (2)
4. Lint condition always true 🐞 Bug ≡ Correctness
Description
The lint step condition base_ref != master || base_ref != main is always true, so the non-release
lint runs even on PRs to main/master and can run alongside --release lint unintentionally.
Code

.github/workflows/linting.yml[R48-57]

      - name: Run nf-core pipelines lint
-        if: ${{ github.base_ref != 'master' }}
+        if: ${{ github.base_ref != 'master' || github.base_ref != 'main' }}
        env:
          GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
        run: nf-core -l lint_log.txt pipelines lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md

      - name: Run nf-core pipelines lint --release
-        if: ${{ github.base_ref == 'master' }}
+        if: ${{ github.base_ref == 'master' || github.base_ref == 'main' }}
Evidence
Using OR between the two inequality checks makes the condition always true for any possible
github.base_ref value, so the step will not be gated as intended.

.github/workflows/linting.yml[48-62]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`.github/workflows/linting.yml` uses `github.base_ref != 'master' || github.base_ref != 'main'`, which is always true.

### Issue Context
This can cause duplicate lint runs (regular + `--release`) on PRs targeting `main`/`master`.

### Fix Focus Areas
- .github/workflows/linting.yml[48-62]

### Expected fix
Update the condition to use AND:
- `if: ${{ github.base_ref != 'master' && github.base_ref != 'main' }}`
(and keep `--release` gated by `== 'master' || == 'main'`).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Lint comment fails on release 🐞 Bug ☼ Reliability
Description
linting.yml runs on release events but still writes PR_number.txt from
github.event.pull_request.number, and linting_comment.yml always posts a PR comment using that
value; on releases the PR number is empty and the comment workflow can fail.
Code

.github/workflows/linting_comment.yml[R19-27]

      - name: Get PR number
        id: pr_number
-        run: |
-          if [ ! -f linting-logs/PR_number.txt ]; then
-            echo "No PR number file found (not a PR event), skipping comment"
-            echo "skip=true" >> $GITHUB_OUTPUT
-            exit 0
-          fi
-          PR_NUM=$(cat linting-logs/PR_number.txt)
-          if ! [[ "$PR_NUM" =~ ^[0-9]+$ ]]; then
-            echo "Invalid PR number: $PR_NUM, skipping comment"
-            echo "skip=true" >> $GITHUB_OUTPUT
-            exit 0
-          fi
-          echo "pr_number=$PR_NUM" >> $GITHUB_OUTPUT
+        run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT

      - name: Post PR comment
-        if: ${{ steps.pr_number.outputs.skip != 'true' }}
-        uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2
+        uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          number: ${{ steps.pr_number.outputs.pr_number }}
Evidence
The linting workflow is triggered for published releases and unconditionally writes a PR number file
from a pull_request-only context. The follow-up workflow_run job then unconditionally reads that
file and posts a sticky PR comment, which is invalid when no PR exists.

.github/workflows/linting.yml[5-9]
.github/workflows/linting.yml[64-67]
.github/workflows/linting_comment.yml[5-28]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The lint-comment workflow always tries to comment on a PR number produced by linting.yml, but linting.yml also runs on `release` events where there is no PR number.

### Issue Context
This is a regression from removing the previous guard around saving PR_number.txt.

### Fix Focus Areas
- .github/workflows/linting.yml[64-67]
- .github/workflows/linting_comment.yml[19-28]

### Expected fix
Implement one (or more) of:
- Restore guard when writing PR_number.txt (only write on PR events / when pull_request.number exists).
- Add a guard in `linting_comment.yml` to skip if PR number is empty/non-numeric.
- Alternatively, prevent `linting_comment.yml` from running when the triggering `workflow_run` originated from a `release` event.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

6. Fix-linting stops before reporting 🐞 Bug ☼ Reliability
Description
The “Commit & push changes” step always runs git commit when prek fails, even if there are no
staged changes, and it’s no longer continue-on-error; this can stop the job before it
reacts/comments about the failure.
Code

.github/workflows/fix_linting.yml[R51-61]

      - name: Commit & push changes
        id: commit-and-push
-        if: steps.pre-commit.outcome == 'failure'
-        continue-on-error: true
+        if: steps.prek.outcome == 'failure'
        run: |
          git config user.email "[email protected]"
          git config user.name "nf-core-bot"
          git config push.default upstream
          git add .
          git status
-          git diff --staged --quiet || git commit -m "[automated] Fix code linting"
+          git commit -m "[automated] Fix code linting"
          git push
Evidence
The previous conditional commit guard was removed; if prek fails without producing changes, `git
commit` exits non-zero and the job can halt, preventing the subsequent feedback steps from running.

.github/workflows/fix_linting.yml[51-62]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`fix_linting.yml` unconditionally runs `git commit ...` (and the step is not `continue-on-error`), which can fail with "nothing to commit" and stop the workflow before it posts failure feedback.

### Issue Context
Older logic avoided this with a staged-diff check.

### Fix Focus Areas
- .github/workflows/fix_linting.yml[51-62]

### Expected fix
Re-introduce a guard such as:
- `git diff --staged --quiet || git commit -m "[automated] Fix code linting"`
Optionally also set `continue-on-error: true` so the later reporting steps still execute.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Qodo Logo

@github-actions

github-actions Bot commented May 1, 2026 •

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit f961b51

+| ✅ 108 tests passed       |+
#| ❔  18 tests were ignored |#
!| ❗   4 tests had warnings |!
Details

❗ Test warnings:

  • files_exist - File not found: conf/igenomes.config
  • files_exist - File not found: conf/igenomes_ignored.config
  • files_exist - File not found: .github/workflows/awstest.yml
  • files_exist - File not found: .github/workflows/awsfulltest.yml

❔ Tests ignored:

✅ Tests passed:

Run details

  • nf-core/tools version 4.0.2
  • Run at 2026-05-01 14:26:49

- Restore imNotification locally in subworkflows/local/utils_nfcore_quantms_pipeline/main.nf.
  nf-core 4.0.2 dropped this helper from utils_nfcore_pipeline (we picked up the trimmed
  version in phase 1), but the project still uses it via params.hook_url for Slack/Teams
  notifications and ships assets/slackreport.json + assets/adaptivecard.json as templates.
  Switched the import from imNotification to getWorkflowVersion (still in the upstream
  utility) and inlined the function in the FUNCTIONS block; fixes nextflow-lint
  "imNotification is not defined" error.
- Re-add assets/adaptivecard.json, assets/slackreport.json, modules.json to
  .prettierignore — TEMPLATE 4.0.2 removed those entries because the upstream template
  no longer ships these files, but the project still does. Without the ignore, prettier
  fails on the embedded Groovy <% %> template syntax.
- Apply prettier's column alignment to the test-profile table in docs/CONTRIBUTING.md
  to match the format the CI hook emits.
Comment on lines +3 to +10
name "Test Workflow UTILS_NFCORE_PIPELINE"
script "../main.nf"
config "subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config"
workflow "UTILS_NFCORE_PIPELINE"
tag "subworkflows"
tag "subworkflows_nfcore"
tag "utils_nfcore_pipeline"
tag "subworkflows/utils_nfcore_pipeline"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Nf-test uses double quotes 📘 Rule violation ⚙ Maintainability

The newly added nf-test workflow file uses double-quoted strings (e.g., name "...", `script
"..."`) without interpolation, violating the documented Groovy/Nextflow style requirement. This
reduces consistency across the DSL/Groovy codebase.
Agent Prompt
## Issue description
New nf-test Groovy/Nextflow DSL uses double-quoted strings without interpolation.

## Issue Context
Repo style requires single-quoted strings unless interpolation is needed.

## Fix Focus Areas
- subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test[3-10]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +13 to +15
paths:
description: "Test paths"
required: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

3. Nf-test required input missing 🐞 Bug ≡ Correctness

The composite action .github/actions/nf-test declares a required paths input, but
.github/workflows/nf-test.yml never supplies it, so GitHub Actions will fail the step before
running any tests.
Agent Prompt
### Issue description
The nf-test composite action requires `inputs.paths`, but the caller does not provide it, causing CI failure.

### Issue Context
The action also currently doesn’t use `paths` in its `nf-test test` command, so requiring it is inconsistent.

### Fix Focus Areas
- .github/actions/nf-test/action.yml[13-15]
- .github/workflows/nf-test.yml[90-101]

### Expected fix
Either:
- Change `paths.required` to `false` (and/or remove the input entirely if unused), **or**
- Pass a `paths` value from `.github/workflows/nf-test.yml` and update the action implementation to actually filter tests by those paths (if intended).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines 48 to +57
- name: Run nf-core pipelines lint
if: ${{ github.base_ref != 'master' }}
if: ${{ github.base_ref != 'master' || github.base_ref != 'main' }}
env:
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
run: nf-core -l lint_log.txt pipelines lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md

- name: Run nf-core pipelines lint --release
if: ${{ github.base_ref == 'master' }}
if: ${{ github.base_ref == 'master' || github.base_ref == 'main' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

4. Lint condition always true 🐞 Bug ≡ Correctness

The lint step condition base_ref != master || base_ref != main is always true, so the non-release
lint runs even on PRs to main/master and can run alongside --release lint unintentionally.
Agent Prompt
### Issue description
`.github/workflows/linting.yml` uses `github.base_ref != 'master' || github.base_ref != 'main'`, which is always true.

### Issue Context
This can cause duplicate lint runs (regular + `--release`) on PRs targeting `main`/`master`.

### Fix Focus Areas
- .github/workflows/linting.yml[48-62]

### Expected fix
Update the condition to use AND:
- `if: ${{ github.base_ref != 'master' && github.base_ref != 'main' }}`
(and keep `--release` gated by `== 'master' || == 'main'`).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines 19 to 27
- name: Get PR number
id: pr_number
run: |
if [ ! -f linting-logs/PR_number.txt ]; then
echo "No PR number file found (not a PR event), skipping comment"
echo "skip=true" >> $GITHUB_OUTPUT
exit 0
fi
PR_NUM=$(cat linting-logs/PR_number.txt)
if ! [[ "$PR_NUM" =~ ^[0-9]+$ ]]; then
echo "Invalid PR number: $PR_NUM, skipping comment"
echo "skip=true" >> $GITHUB_OUTPUT
exit 0
fi
echo "pr_number=$PR_NUM" >> $GITHUB_OUTPUT
run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT

- name: Post PR comment
if: ${{ steps.pr_number.outputs.skip != 'true' }}
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2
uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.pr_number.outputs.pr_number }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

5. Lint comment fails on release 🐞 Bug ☼ Reliability

linting.yml runs on release events but still writes PR_number.txt from
github.event.pull_request.number, and linting_comment.yml always posts a PR comment using that
value; on releases the PR number is empty and the comment workflow can fail.
Agent Prompt
### Issue description
The lint-comment workflow always tries to comment on a PR number produced by linting.yml, but linting.yml also runs on `release` events where there is no PR number.

### Issue Context
This is a regression from removing the previous guard around saving PR_number.txt.

### Fix Focus Areas
- .github/workflows/linting.yml[64-67]
- .github/workflows/linting_comment.yml[19-28]

### Expected fix
Implement one (or more) of:
- Restore guard when writing PR_number.txt (only write on PR events / when pull_request.number exists).
- Add a guard in `linting_comment.yml` to skip if PR number is empty/non-numeric.
- Alternatively, prevent `linting_comment.yml` from running when the triggering `workflow_run` originated from a `release` event.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

//
// Construct and send a notification to a web server as JSON e.g. Microsoft Teams and Slack
//
def imNotification(summary_params, hook_url) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Missing imnotification function 🐞 Bug ≡ Correctness

imNotification is still imported and called by the pipeline completion subworkflow, but it no
longer exists in utils_nfcore_pipeline, causing Nextflow compilation to fail before the pipeline
can run.
Agent Prompt
### Issue description
`subworkflows/local/utils_nfcore_quantms_pipeline/main.nf` imports and calls `imNotification`, but the synced `subworkflows/nf-core/utils_nfcore_pipeline/main.nf` no longer defines it, causing Nextflow compilation to fail.

### Issue Context
This is a template-sync regression: nf-core 4.0.2 dropped `imNotification`, but the project-specific completion subworkflow still expects it.

### Fix Focus Areas
- subworkflows/local/utils_nfcore_quantms_pipeline/main.nf[11-16]
- subworkflows/local/utils_nfcore_quantms_pipeline/main.nf[60-63]
- subworkflows/nf-core/utils_nfcore_pipeline/main.nf[341-355]

### Expected fix
Choose one:
1) Re-introduce `imNotification(summary_params, hook_url)` (and any required assets usage) in `utils_nfcore_pipeline/main.nf`, or
2) Remove the `include { imNotification ... }` and the call site from the local pipeline completion logic (and deprecate `hook_url` if no longer supported).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

ypriverol added 3 commits May 1, 2026 15:11
The TEMPLATE workflow runs tests/default.nf.test under -profile test,
but the project has no 'test' profile (only test_dia, test_dia_dotd,
test_dda, ...) and the test file itself is a stale fork-skeleton
(snapshots nf_core_quantms_software_mqc_versions.yml — the project
is named quantmsdiann, not quantms). The job fails on every run.

Wiring up proper nf-test integration needs:
- a 'test' profile or alias for one of the existing test_dia profiles
- a real tests/default.nf.test body for quantmsdiann
- snapshot generation and ongoing maintenance

That's a separate effort from "absorb the 4.0.2 template" — defer to
a follow-up PR. Existing CI (ci.yml, merge_ci.yml, extended_ci.yml)
keeps using profile-based DIA-NN testing as before.

The composite actions (.github/actions/get-shards, .github/actions/nf-test)
stay as-is — they were on dev pre-sync, and the 4.0.2 refresh is harmless
since nothing invokes them now.
Nextflow >= 25.10 (which we adopted via the manifest bump) emits
"Unrecognized config option 'validation.defaultIgnoreParams'" /
"validation.monochromeLogs" warnings on every run. Root cause:
nf-schema 2.5.1 doesn't register its config schema with Nextflow at
parse time, so Nextflow doesn't know the validation namespace is
plugin-owned and warns. nf-schema 2.6.1 registers properly.

This is the version the test subworkflow's nextflow.config was already
using (we updated subworkflows/nf-core/utils_nfschema_plugin/tests/
nextflow.config to 2.6.1 in phase 1) — main pipeline config was just
out of sync.

API compatibility check:
- paramsSummaryMap, paramsSummaryLog, validateParameters, paramsHelp:
  all stable across 2.5 → 2.6
- params.help boolean vs string handling: already covered by the
  utils_nfschema_plugin/main.nf update absorbed in phase 1

Drop the now-stale "[email protected] (version specified in nextflow.config)"
comment in utils_nfcore_quantms_pipeline/main.nf so the version pin
isn't duplicated.
The Phase 1 manifest bump set nextflowVersion = '!>=25.10.4', but the
project CI workflows pin NXF_VER = "25.04.0" directly, so CI was running
with an older Nextflow than the manifest required. With the nf-schema
plugin bump to 2.6.1 (also from this PR), the older Nextflow couldn't
resolve the plugin in its repository — "Plugin nf-schema with version
@2.6.1 does not exist in the repository" — and CI failed at startup.

Fixes:

- ci.yml, extended_ci.yml, merge_ci.yml: bump all NXF_VER pins from
  25.04.0 to 25.10.4 (7 occurrences across the three workflows; the
  "latest-everything" matrix entries in extended_ci.yml are unchanged
  since they intentionally test the absolute newest)
- ro-crate-metadata.json: bump engineVersion to "!>=25.10.4" so the
  RO-Crate metadata matches the manifest
- AGENTS.md: bump three references (DSL2 syntax requirement, the
  NXF_VER export example, the "Minimum Nextflow" header)
- modules.json: add trailing newline so end-of-file-fixer doesn't
  re-introduce noise (linter ran earlier and dropped it; multi-line
  array formatting kept since it matches nf-core convention)
@ypriverol

Copy link
Copy Markdown
Contributor Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@ypriverol ypriverol changed the title chore: nf-core 4.0.2 template sync (manual, phase 1 + 2a) chore: nf-core 4.0.2 template sync May 2, 2026
@ypriverol
ypriverol merged commit c3baba3 into dev May 2, 2026
46 of 51 checks passed
@ypriverol
ypriverol deleted the template-sync-4.0.2 branch May 5, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant