Skip to content

Container Linting for Modules #4041

@JulianFlesch

Description

@JulianFlesch

Implement linting for the wave functionality described in #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)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions