From 07f62a76c58eb5a3e11302fdf1a7e337f1de9bda Mon Sep 17 00:00:00 2001 From: drpatelh Date: Sun, 7 Feb 2021 23:40:26 +0000 Subject: [PATCH] Re-word CI tests --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b7ddbde3..2fc2eb83 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ A repository for hosting [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl - [Adding a new module file](#adding-a-new-module-file) - [Module template](#module-template) - [Guidelines](#guidelines) - - [Testing](#testing) + - [CI tests](#ci-tests) - [Documentation](#documentation) - [Uploading to `nf-core/modules`](#uploading-to-nf-coremodules) - [Terminology](#terminology) @@ -224,19 +224,17 @@ The `saveFiles` function can be found in the [`functions.nf`](software/fastqc/fu We also use a standardised parameter called `params.publish_dir_mode` that can be used to alter the file publishing method (default: `copy`). -### Testing +### CI tests - All test data for `nf-core/modules` MUST be added to [`tests/data/`](tests/data/) and organised by filename extension. +- In order to keep the size of this repository as minimal as possible, pre-existing files from [`tests/data/`](tests/data/) MUST be reused if at all possible. + - Test files MUST be kept as tiny as possible. -- Every module MUST be tested by adding a test workflow with a toy dataset in the [`tests/`](tests/software/fastqc/main.nf) directory of the module. +- Every module MUST have a test workflow utilising test data added to the appropriate directory e.g. [`tests/software/fastqc/main.nf`](tests/software/fastqc/main.nf) -- Generic files from [`tests/data/`](tests/data/) MUST be reused by importing them as `file(${launchDir}/tests/data/fastq/rna/test_single_end.fastq.gz)` - -- Any outputs produced by the test workflow MUST be included in the [pytest-workflow](https://pytest-workflow.readthedocs.io/en/stable) for that tool. md5sum is preferred, however it's acceptable to not have it on files that the hash changes due to various headers and timestamps (html). Please do your best to avoid just checking for the file being present. - -- If the appropriate test data doesn't exist for your module then it MUST be added to [`tests/data/`](tests/data/). +- Any outputs produced by the test workflow MUST be included in the [pytest-workflow](https://pytest-workflow.readthedocs.io/en/stable) for that tool e.g. [`tests/software/fastqc/test.yml`](tests/software/fastqc/test.yml). `md5sum` checks are the preferable choice of test to determine file changes, however, this may not be possible for all outputs generated by some tools e.g. if they include time stamps or command-related headers. Please do your best to avoid just checking for the file being present e.g. it may still be possible to check that the file contains the appropriate text snippets. - A filter for the module must be created in [`.github/filters.yml`](.github/filters.yml). Please include any paths specific for that tool or upstream of that tool (For example bowtie build is upstream of bowtie align).