nf-core / nf-core/tools

Container Linting for Modules

Open
#4,041 1 comment 0 reactions 2 assignees View on GitHub

@ningyuxin1999 is already working on this.

Since Feb 12, 2026.

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

Description

Implement linting for the wave functionality described in https://github.com/nf-core/tools/issues/3952

Linting Tasks:

Lint meta.yml

  • if containers section exists: Check if docker linux/amd64 image exists (Exceptions to this for modules in https://github.com/nf-core/modules/blob/master/.github/skip_nf_test.json)
    -> Assume that we are linting for the modules repo and this file exists locally

  • Check if hash part ofbuild_id (bd-this_part_1234089273409_2) matches the docker / singularity container name.

  • Check for conda if the hash in build_id for the docker linux/amd64 image matches the hash in the conda lock_file

  • Check for singularity and docker if the correct protocol is used: oras for singularity, http for docker

  • Check for conda if lock_files exist

Lint main.nf:

  • Check if container specified in main.nf matches the docker linux/amd64 image (without registry) from meta.yml "containers" section.
    -> Add functionality to fix automatically

Lint the conda lock files / environment.yaml:

  • Check for conda if the dependencies + versions match / appear in the conda lock files.
    -> Look out for differneces between Python version, conda dependencies, and pip dependencies.

Where this goes

Extend the modules/lint/meta_yaml.py, modules/lint/main_nf.py files, add modules/lint/modules_containers.py

How this is used

  • Add all new linting functions to modules/lint/__init__.py
  • Add container linting functions to the new subcommand nf-core modules containers list (at least for testing)

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.