Skip to content

UNZIP: modernize to latest nf-core conventions#11014

Open
maxcumminsandfred-lab wants to merge 5 commits intonf-core:masterfrom
maxcumminsandfred-lab:update/unzip-2026-03-22
Open

UNZIP: modernize to latest nf-core conventions#11014
maxcumminsandfred-lab wants to merge 5 commits intonf-core:masterfrom
maxcumminsandfred-lab:update/unzip-2026-03-22

Conversation

@maxcumminsandfred-lab
Copy link
Contributor

Summary

Migrate the unzip module from legacy cat <<-END_VERSIONS > versions.yml heredoc to the modern eval() inline output with topic: versions. Remove versions.yml heredoc from stub block (eval runs automatically in stub mode). Update dependent subworkflows to handle the removal of .out.versions.

Changes

  • modules/nf-core/unzip/main.nf: Replace heredoc version output with eval('7za --help | sed -n "s/.*p7zip Version //p" | sed "s/ .*//"') and topic: versions. Remove heredoc from both script and stub blocks.
  • modules/nf-core/unzip/meta.yml: Add topics: and versions_7za: output sections (auto-generated by lint --fix). Remove stale versions: versions.yml output entry.
  • modules/nf-core/unzip/tests/main.nf.test.snap: Updated snapshots reflecting new version tuple format ["UNZIP", "7za", "16.02"].
  • subworkflows/nf-core/archive_extract/main.nf: Remove versions variable and emit entirely — all 3 included modules (GUNZIP, UNTAR, UNZIP) now use topic: versions, so subworkflow-level version collection is no longer needed.
  • subworkflows/nf-core/archive_extract/meta.yml: Remove versions output entry.
  • subworkflows/nf-core/archive_extract/tests/main.nf.test.snap: Updated snapshot (no longer includes versions key).
  • subworkflows/nf-core/homer_groseq/main.nf: Remove ch_versions.mix(UNZIP.out.versions) — UNZIP now emits via topic. HOMER modules remain legacy and still use ch_versions.

Verification

  • Lint: PASSED (46 passed, 0 warnings, 0 failed)
  • Module tests: 2 passed, 0 failed (docker profile)
  • archive_extract tests: 1 passed, 0 failed (docker profile)
  • homer_groseq tests: 4 passed, 0 failed (docker profile)
  • Snapshots: stable (verified across 2 runs for all test suites)

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • 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.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

maxcumminsandfred-lab and others added 5 commits March 22, 2026 17:41
Replace heredoc cat <<-END_VERSIONS with eval() inline output and
topic: versions. Remove versions.yml heredoc from stub block.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Snapshots verified stable across 2 runs (with and without --update-snapshot).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rsions.yml output

Auto-generated topics: section via nf-core modules lint --fix.
Removed stale versions: versions.yml output entry left after eval migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
archive_extract: Remove versions variable and emit entirely — all 3
modules (GUNZIP, UNTAR, UNZIP) now use topic: versions, so version
collection at the subworkflow level is no longer needed.

homer_groseq: Remove ch_versions.mix(UNZIP.out.versions) — UNZIP now
emits versions via topic. Other HOMER modules remain legacy and still
use ch_versions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary

Migrate the unzip module from legacy `cat <<-END_VERSIONS > versions.yml` heredoc to the modern `eval()` inline output with `topic: versions`. Remove versions.yml heredoc from stub block (eval runs automatically in stub mode). Update dependent subworkflows to handle the removal of `.out.versions`.

## Changes

- `modules/nf-core/unzip/main.nf`: Replace heredoc version output with `eval('7za --help | sed -n "s/.*p7zip Version //p" | sed "s/ .*//"')` and `topic: versions`. Remove heredoc from both script and stub blocks.
- `modules/nf-core/unzip/meta.yml`: Add `topics:` and `versions_7za:` output sections (auto-generated by lint --fix). Remove stale `versions: versions.yml` output entry.
- `modules/nf-core/unzip/tests/main.nf.test.snap`: Updated snapshots reflecting new version tuple format `["UNZIP", "7za", "16.02"]`.
- `subworkflows/nf-core/archive_extract/main.nf`: Remove `versions` variable and emit entirely — all 3 included modules (GUNZIP, UNTAR, UNZIP) now use `topic: versions`, so subworkflow-level version collection is no longer needed.
- `subworkflows/nf-core/archive_extract/meta.yml`: Remove `versions` output entry.
- `subworkflows/nf-core/archive_extract/tests/main.nf.test.snap`: Updated snapshot (no longer includes `versions` key).
- `subworkflows/nf-core/homer_groseq/main.nf`: Remove `ch_versions.mix(UNZIP.out.versions)` — UNZIP now emits via topic. HOMER modules remain legacy and still use `ch_versions`.

## Verification

- Lint: PASSED (46 passed, 0 warnings, 0 failed)
- Module tests: 2 passed, 0 failed (docker profile)
- archive_extract tests: 1 passed, 0 failed (docker profile)
- homer_groseq tests: 4 passed, 0 failed (docker profile)
- Snapshots: stable (verified across 2 runs for all test suites)

## PR checklist

- [x] This comment contains a description of changes (with reason).
- [x] If you've fixed a bug or added code that should be tested, add tests!
- [ ] If you've added a new tool - have you followed the module conventions in the [contribution docs](https://github.com/nf-core/modules/tree/master/.github/CONTRIBUTING.md)
- [ ] If necessary, include test data in your PR.
- [x] Remove all TODO statements.
- [x] Broadcast software version numbers to `topic: versions` - [See version_topics](https://nf-co.re/blog/2025/version_topics)
- [x] Follow the naming conventions.
- [x] Follow the parameters requirements.
- [x] Follow the input/output options guidelines.
- [x] Add a resource `label`
- [x] Use BioConda and BioContainers if possible to fulfil software requirements.
- Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
  - For modules:
    - [x] `nf-core modules test <MODULE> --profile docker`
    - [ ] `nf-core modules test <MODULE> --profile singularity`
    - [ ] `nf-core modules test <MODULE> --profile conda`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@maxcumminsandfred-lab
Copy link
Contributor Author

Should archive_extract retain a versions emit after all modules migrate to topic: versions?

GUNZIP and UNTAR appear to already be migrated, so with this UNZIP PR all 3 modules use topics. I removed ch_versions.mix() and the versions emit since topic outputs appear to bypass workflow.out at the subworkflow level.

Checking for precedent: I found 69 multi-module subworkflows where all included modules appear to use topic: versions. 63 have no ch_versions or versions emit. The remaining 6 still emit versions but the channel appears empty. I was unable to find any
subworkflow snapshot containing modern-style version tuples.

Examples that appear to follow this pattern:

bam_rseqc (8 modules): https://github.com/nf-core/modules/tree/master/subworkflows/nf-core/bam_rseqc

fasta_index_bismark_bwameth (5 modules):
https://github.com/nf-core/modules/tree/master/subworkflows/nf-core/fasta_index_bismark_bwameth

Is this correct, or should fully-migrated subworkflows retain versions in some form?

@maxcumminsandfred-lab maxcumminsandfred-lab marked this pull request as ready for review March 22, 2026 21:47
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