nf-core / modules

Repository to host tool-specific module files for the Nextflow DSL2 community!
https://nf-co.re/modules
MIT License
284 stars 723 forks source link

Fix `versions.yml` in all modules #745

Closed grst closed 1 year ago

grst commented 3 years ago

COMPLETED

drpatelh commented 3 years ago

The typical command used to run pytest has changed now. Don't forget to add NF_CORE_MODULES_TEST=1 to the beginning. We need to export that environment variable to be able to test the versions stuff.

Docker:

cd /path/to/git/clone/of/nf-core/modules/
NF_CORE_MODULES_TEST=1 PROFILE=docker pytest --tag fastqc --symlink --keep-workflow-wd

Singularity

cd /path/to/git/clone/of/nf-core/modules/
NF_CORE_MODULES_TEST=1 TMPDIR=~ PROFILE=singularity pytest --tag fastqc --symlink --keep-workflow-wd
grst commented 3 years ago

If anyone gets a FileNotFoundError for versions.yml like this one, then double-check that the workflow name in test.yml needs to start with the tool name.

FileNotFoundError: [Errno 2] No such file or directory: '/data/scratch/sturm/projects/2021/nf-core-modules-test-2/18/e188685ed693dac21be7e96d1ac8f3/pytest-workflow/Run_bismark_align_single-end_test_workflow/output/run/versions.yml'

/data/scratch/sturm/projects/2021/nf-core-modules-test-2/conda/nf-core-tools-dev-5bfdd78995f6a1657f45a07545dfe96b/lib/python3.8/pathlib.py:1078: FileNotFoundError

The fix of test.yml:

-- name: Run bismark align single-end test workflow
+- name: bismark align single-end test workflow
jfy133 commented 3 years ago

Note, updated profile command:

NF_CORE_MODULES_TEST=1 TMPDIR=/tmp/ PROFILE=singularity pytest tests/modules/fgbio/sortbam --symlink --wt 2 --keep-workflow-wd

from: https://nfcore.slack.com/archives/CJRH30T6V/p1632766640143300

muffato commented 1 year ago

The two tools that were as TODO actually got fixed a few weeks after