meta.json stub file trips up meta_nf_meta_key linting
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
Hi all,
This links to https://github.com/nf-core/modules/pull/11373
The blobtk/create module creates a minimal blobdir (blobtoolkit directory) which has a specific format.
One of the files it produces is a meta.json. This seems to be tripping up on the meta.json, value in the stub, not being a valid meta (map) value.
These files make up the minimal definition of a blobdir
stub:
prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p ${prefix}
touch ${prefix}/meta.json
touch ${prefix}/gc.json
touch ${prefix}/identifiers.json
touch ${prefix}/n.json
touch ${prefix}/ncount.json
touch ${prefix}/length.json
"""
Also meta_nf_meta_key doesn't seem to be documented here: https://nf-co.re/docs/nf-core-tools/api_reference/4.0.1/module_lint_tests/main_nf
I know there's other linting errors with the modules, i'm fixing those at the minute.
Command used and terminal output
conda create --name nf-core_4 nf-core nextflow
---> installs
nextflow bioconda/noarch::nextflow-26.04.0-h2a3209d_0
nf-core bioconda/noarch::nf-core-4.0.0-pyhdfd78af_0
nf-test bioconda/noarch::nf-test-0.9.5-h2a3209d_0
git clone https://github.com/nf-core/modules.git
git switch new_blobtk_modules
nf-core modules lint blobtk/create
INFO Linting modules repo: '.'
INFO Linting module: 'blobtk/create'
╭─ [!] 2 Module Test Warnings ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ╷ ╷ │
│ Module name │ File path │ Test message │
│╶──────────────┼───────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╴│
│ blobtk/create │ modules/nf-core/blobtk/create/main.nf │ container_links: Unable to connect to container registry, code: 404, url: │
│ │ │ https://community.wave.seqera.io/library/blobtk:0.8.0--2fe0d833a26e0cd9 │
│ blobtk/create │ modules/nf-core/blobtk/create/main.nf │ main_nf_container: Container versions do not match │
│ ╵ ╵ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ [✗] 1 Module Test Failed ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ╷ ╷ │
│ Module name │ File path │ Test message │
│╶──────────────┼───────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╴│
│ blobtk/create │ modules/nf-core/blobtk/create/main.nf │ main_nf_meta_key: Invalid 'meta' keys detected: meta.json │
│ ╵ ╵ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────╮
│ LINT RESULTS SUMMARY │
├───────────────────────┤
│ [✔] 51 Tests Passed │
│ [!] 2 Test Warnings │
│ [✗] 1 Test Failed │
╰───────────────────────╯
System information
No response
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
Start by running nf-core modules lint blobtk/create against modules/nf-core/blobtk/create/main.nf and review the main_nf_meta_key test in the nf-core tools lint implementation. Compare the reported meta.json stub output with the documented module lint tests; done means the valid blobdir stub no longer produces an incorrect failure and the behavior is covered by an appropriate test.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100