nf-core / nf-core/tools

linting fails to execute if "----" present in module patch diff file

Open
#3,281 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Description of the bug

Linting will fail to run if "----" is present in a module patch diff file.

Image

In an nf-core pipeline that currently passes linting add one of the latest samtools modules.

nf-core modules install samtools/dict

Modify the environment.yaml file to use a name: and remove the schema reference, because without non-unique conda environments currently break nextflow (until the next release at least). https://github.com/nextflow-io/nextflow/pull/5489

name: samtools_dict
channels:
  - conda-forge
  - bioconda
dependencies:
  - bioconda::htslib=1.21
  - bioconda::samtools=1.21

Linting should still complete successfully at this point.

nf-core pipelines lint

Be responsible, document your patch! Run

nf-core modules patch samtools/dict

Now run linting again.

nf-core pipelines lint
ERROR    not enough values to unpack (expected 2, got 1)

If you remove the "----" line from the diff file, linting will pass again.

Command used and terminal output

System information

Nextflow version: 24.04.4
Hardware: Desktop
Executor: NA
OS: macOS
nf-core/tools version: 3.0.2
python version: 3.12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure by installing samtools/dict, editing environment.yaml, running nf-core modules patch samtools/dict, and then running nf-core pipelines lint. Start by tracing how the module patch diff is parsed, especially the "----" line; done means linting completes successfully without removing that line.

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
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.