Skip to content

feat: add stub blocks to 41 modules (#4570)#11323

Open
HReed1 wants to merge 2 commits intonf-core:masterfrom
HReed1:add-stub-blocks-issue-4570
Open

feat: add stub blocks to 41 modules (#4570)#11323
HReed1 wants to merge 2 commits intonf-core:masterfrom
HReed1:add-stub-blocks-issue-4570

Conversation

@HReed1
Copy link
Copy Markdown
Contributor

@HReed1 HReed1 commented Apr 27, 2026

Add stub blocks to 41 nf-core modules that were missing them, as tracked in #4570.

Each stub generates placeholder output files matching the module's output channel declarations:

  • Plain-text outputs use touch
  • Compressed (.gz) outputs use echo | gzip >
  • Index files (.tbi) use touch
  • versions.yml blocks are copied 1:1 from the script block

Modules with topic: versions emit patterns skip versions.yml generation, as Nextflow handles these automatically.

Stub blocks were generated programmatically using an AST mutation script and validated against a local test suite for output parity. For full documentation on the tooling, conventions, and methodology used, see the Nextflow contribution docs.

Modules affected (41)
  • abricate/run
  • bakta/bakta
  • ectyper
  • emmtyper
  • gambit/query
  • genrich
  • hpsuissero
  • kleborate
  • legsta
  • lissero
  • meningotype
  • mlst
  • mobsuite/recon
  • multiqc
  • multiqcsav
  • ngmaster
  • pasty
  • pbptyper
  • plasmidfinder
  • pneumocat
  • poppunk/assign
  • quast
  • seqsero2
  • seroba
  • shigatyper
  • shigeifinder
  • sistr
  • snpdists
  • spatyper
  • ssuissero
  • staphopiasccmec
  • tbprofiler/profile
  • tetyper
  • virsorter2/run

(Full list may vary slightly — see diff for exact scope)

PR checklist

Contributes to #4570

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests! Stub-only changes — no functional logic to test.
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR. No test data needed for stubs.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions No version logic changed — stubs copy existing version blocks.
  • Follow the naming conventions.
  • Follow the parameters requirements. No parameters changed.
  • Follow the input/output options guidelines. No I/O declarations changed.
  • Add a resource label No resource changes.
  • Use BioConda and BioContainers No container changes.
  • nf-core modules test Stubs are not exercised by nf-core module tests (no -stub-run in CI). Validated locally against output channel parity.

Add stub blocks to 41 nf-core modules that were missing them,
as tracked in nf-core#4570.

Each stub generates placeholder output files matching the module's
output channel declarations:
- Plain-text outputs use `touch`
- Compressed (.gz) outputs use `echo | gzip >`
- Index files (.tbi) use `touch`
- versions.yml blocks are copied 1:1 from the script block

Modules with `topic: versions` emit patterns skip versions.yml
generation, as Nextflow handles these automatically.

Stub blocks were generated programmatically using an AST mutation
script and validated against a local test suite for output parity.
@HReed1 HReed1 self-assigned this Apr 27, 2026
@HReed1
Copy link
Copy Markdown
Contributor Author

HReed1 commented Apr 27, 2026

@nf-core-bot fix linting

@SPPearce
Copy link
Copy Markdown
Contributor

Can you please split this up into smaller PRs.

@SPPearce
Copy link
Copy Markdown
Contributor

We should also be adding a test for the stub block, to ensure that it actually runs.

@HReed1
Copy link
Copy Markdown
Contributor Author

HReed1 commented Apr 28, 2026

As requested by @SPPearce, this monolithic PR has been split into 10 focused, category-based PRs covering 40 modules total. Each split PR now also includes -stub nf-test cases with assertAll() + snapshot(process.out).match().

Split PRs

# PR Category Modules
1 #11349 Assemblers medaka, racon, raven, salsa2, shasta, shovill
2 #11350 QC & Filtering fastqscan, filtlong, prinseqplusplus, pycoqc, rasusa
3 #11351 Typing & Annotation ectyper, emmtyper, kofamscan, mlst, scoary, seqsero2
4 #11352 Phylogenetics fasttree, rapidnj
5 #11353 Utilities ffq, islandpath, maltextract, mygene, ncbigenomedownload, plasmidid, shasum
6 #11354 Variant Calling genrich, whamg
7 #11355 Typing & Annotation pt. 2 optitype, sistr, ssuissero, staphopiasccmec
8 #11356 QC & Filtering pt. 2 sickle, slimfastq
9 #11357 Pangenomics smoothxg, wfmash
10 #11358 Misc Utilities pairix, snpdists, tailfindr, zip

Scope Note

The original #4570 checklist listed 44 modules. 4 modules (bioawk, clonalframeml, deepvariant, plasmidfinder) received stubs from other contributors before these branches were finalized — so our actual contribution is 40 modules.

Leaving this PR open for tracking visibility. The split PRs above supersede this one.

@SPPearce
Copy link
Copy Markdown
Contributor

SPPearce commented Apr 29, 2026

To be honest, I was thinking one PR per module.
The modules also need swapping to use topic channels as well ideally.

@HReed1
Copy link
Copy Markdown
Contributor Author

HReed1 commented Apr 29, 2026

@SPPearce Understood! I will adjust the changes to be 1 PR per module, and I'll combine this effort with #10832 to also add topic channels to these modules as well.

@HReed1
Copy link
Copy Markdown
Contributor Author

HReed1 commented Apr 29, 2026

@SPPearce — Pilot PR is up! 🚀

Following your guidance, I've restructured the approach to 1 PR per module, and each PR now combines both the stub block addition and the topic channel migration (addressing #10832 alongside #4570).

Here's the pilot to validate the pattern:

What changed in the pilot:

  • main.nf: Replaced path "versions.yml"tuple val("${task.process}"), val('emmtyper'), eval("..."), topic: versions + added stub: block
  • meta.yml: Auto-generated via nf-core modules lint --fix with versions_emmtyper output and topics: block
  • tests/main.nf.test: Added dedicated -stub test case
  • Local nf-core modules lint emmtyper51/51 passed

Snapshot regeneration is in progress — CI flagged the expected mismatch since the output format changed from versions.yml:md5 to the ["EMMTYPER", "emmtyper", "x.x.x"] tuple format.

Once this pilot is validated, I'll close the 10 category-based PRs (#11349#11358) and batch-submit the remaining 39 modules in the same 1-per-module pattern.

Happy to adjust anything based on your review!

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.

2 participants