nf-core modules lint --fix produces mangled output
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 322
- Forks
- 255
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 5
Description
Description of the bug
When I use nf-core/modules lint --fix on a module PR, the resulting meta.yml does not successfully lint.
The PR where I encountered the issue: https://github.com/nf-core/modules/pull/9360
The meta.yml at time of writing: https://github.com/nf-core/modules/blob/042a85dfd3a924e299099a22b299b077d7d722a5/modules/nf-core/trident/fetch/meta.yml
Command used and terminal output
The original linting error:
╭─ [✗] 1 Module Test Failed ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ╷ ╷ │
│ Module name │ File path │ Test message │
│╶───────────────┼────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╴│
│ trident/fetch │ modules/nf-core/trident/fetch/meta.yml │ correct_meta_outputs: Module meta.yml does not match main.nf. Outputs should contain: {'poseidon_yml': ['output_archive//POSEIDON.yml'], │
│ │ │ 'geno': ['output_archive//.{bed'], 'snp': ['output_archive//.{bim'], 'ind': ['output_archive//.{fam'], 'janno': ['output_archive//.janno'], │
│ │ │ 'ssf': ['output_archive//.ssf'], 'bib': ['output_archive//.bib'], 'changelog': ['output_archive//CHANGELOG.md'], 'readme': │
│ │ │ ['output_archive/*/README.md'], 'versions': ['versions.yml']} Run nf-core modules lint --fix to update the meta.yml file. │
│ ╵ ╵ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
The meta.yml created by nf-core modules lint trident/fetch --fix:
[...]
input:
- - archive_dir:
type: directory
description: |
The path to the directories containing any previously downloaded Poseidon archive files.
If this is provided, trident fetch will check these directories, and only download missing packages from the Poseidon-Framework server.
- fetch_s:
type: string
description: The fetchString provided to trident fetch (`--fetchString`),
if any.
- fetch_fn:
type: file
description: A file containing a list of fetchStrings provided to trident
fetch (`--fetchFile`), if any.
pattern: "*.txt"
ontologies: []
output:
poseidon_yml:
- output_archive/*/POSEIDON.yml:
type: file
description: The POSEIDON.yml file of any newly downloaded package(s).
pattern: "output_archive/*/POSEIDON.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
geno:
- output_archive/*/*.{bed: {}
snp:
- output_archive/*/*.{bim: {}
ind:
- output_archive/*/*.{fam: {}
janno:
- output_archive/*/*.janno:
type: file
description: The .janno annotation files of any newly downloaded
package(s).
pattern: "output_archive/*/*.janno"
ontologies: []
ssf:
- output_archive/*/*.ssf:
type: file
description: The .ssf files of any newly downloaded package(s).
pattern: "output_archive/*/*.ssf"
ontologies: []
bib:
- output_archive/*/*.bib:
type: file
description: The .bib bibliography files of any newly downloaded
package(s).
pattern: "output_archive/*/*.bib"
ontologies: []
changelog:
- output_archive/*/CHANGELOG.md:
type: file
description: The CHANGELOG.md files of any newly downloaded package(s).
pattern: "output_archive/*/CHANGELOG.md"
ontologies: []
readme:
- output_archive/*/README.md:
type: file
description: The README.md files of any newly downloaded package(s).
pattern: "output_archive/*/README.md"
ontologies: []
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: "http://edamontology.org/format_3750" # YAML
[...]
The output of nf-core modules lint trident/fetch after running with --fix:
╭─ [✗] 1 Module Test Failed ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ╷ ╷ │
│ Module name │ File path │ Test message │
│╶───────────────┼────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╴│
│ trident/fetch │ modules/nf-core/trident/fetch/meta.yml │ meta_yml_valid: The meta.yml of the module trident/fetch is not valid: {'output_archive//.{bim': {}} is not valid under any of the given │
│ │ │ schemas. Check the entry for output. │
│ ╵ ╵ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
System information
Nextflow version: 25.04.8 build 5956
Hardware: MacBook Pro
OS: macOS 15.4 (24E248)
Version of nf-core/tools: 3.4.1
Python version: 3.14.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with nf-core modules lint trident/fetch --fix, using the referenced modules/nf-core/trident/fetch/meta.yml and main.nf. Trace how the lint-fix entry point converts output patterns, then verify that the generated meta.yml passes nf-core modules lint and remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100