Repository navigation
chore: nf-core 4.0.2 template sync - #77
Conversation
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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Review Summary by QodoSync bigbio/quantmsdiann to nf-core 4.0.2 template (phase 1 + 2a)
WalkthroughsDescription• 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 Diagramflowchart 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"]
File Changes1. .devcontainer/devcontainer.json
|
Code Review by Qodo
1. nf-test uses double quotes
|
|
- 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.
| 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" |
There was a problem hiding this comment.
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
| paths: | ||
| description: "Test paths" | ||
| required: true |
There was a problem hiding this comment.
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
| - 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' }} |
There was a problem hiding this comment.
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
| - 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 }} |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
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)
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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:
.devcontainer/devcontainer.jsonfile to support GitHub Codespaces and local devcontainers, specifying the environment image, user, resource requirements, and a setup script for initializing the environment..devcontainer/setup.shto customize the terminal prompt, update Nextflow, and display a welcome message for devcontainer users.CI/CD and GitHub Actions Updates:
get-shardsandnf-testactions to accept new inputs (likepaths), improved error handling, and updated to use the latest action versions. [1] [2] [3] [4]Documentation and Configuration Clean-up:
.github/CONTRIBUTING.mdin favor of referencing documentation in thedocs/directory..github/PULL_REQUEST_TEMPLATE.mdto point to the new location of the contributing documentation..github/ISSUE_TEMPLATE/config.ymlto the correct#quantmsdiannchannel..github/.dockstore.ymlfor 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/quantmsdianntemplate scaffolding to nf-core/tools 4.0.2 without ever doinggit 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 theTEMPLATEbranch accumulated project commits and the merge-base contains project files. We instead cherry-picked template files by hand.Two commits:
d71d60cPhase 1 — infrastructure only. ManifestnextflowVersion→!>=25.10.4;.devcontainer/,.vscode/settings.json,tower.yml; new CI workflowsdownload_pipeline.ymlandnf-test.yml;.github/workflows/*and.github/actions/*action-version bumps +pre-commit→prekswitch;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).48df483Phase 2a — lint fixes & badge/link consistency. MoveCONTRIBUTING.mdtodocs/(4.0.2 convention) and add a quantmsdiann-specific section. Updatemodules.jsonSHAs forutils_nfcore_pipelineandutils_nfschema_plugin(matches refreshed file content; fixescheck_local_copy). Removesubworkflows/local/utils_nfcore_quantms_pipeline/meta.yml(4.0.2 drops meta.yml for local subworkflows; fixesmeta_name). Bump nf-core template badge3.5.2 → 4.0.2inREADME.mdandro-crate-metadata.json, fix the now-brokenCONTRIBUTING.mdlink (was.github/, nowdocs/), 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_outputsonPIPELINE_COMPLETION— completion workflow legitimately has no outputs (side-effect only). TEMPLATE avoids the warning by also definingPIPELINE_INITIALISATIONin the same file; adopting that pattern requires adapting it to quantmsdiann's SDRF input — Phase 2 work, not in scope here.main_nf_includeonsubworkflows/local/input_checkandsubworkflows/local/create_input_channel— both are single-module wrappers.INPUT_CHECKis a well-known nf-core convention name;CREATE_INPUT_CHANNELcarries the runtime enum guard for--local_input_type. Cosmetic warning, abstractions stay.Test plan
nf-core pipelines lintclean except the two accepted warnings noted abovenf-core pipelines schema lintprek run --all-files(orpre-commit run --all-files)nextflow run . -profile test_dia,docker --outdir results-validationsmoke testnf-test,linting,download_pipeline, plus existingci/merge_ci/extended_ciOut 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 thesubworkflows/local/utils_nfcore_quantms_pipeline→utils_nfcore_quantmsdiann_pipelinerename and thePIPELINE_INITIALISATIONworkflow adoption.