diff --git a/modules/nf-core/eido/validate/meta.yml b/modules/nf-core/eido/validate/meta.yml index f585a3f58a5..3d895af2903 100644 --- a/modules/nf-core/eido/validate/meta.yml +++ b/modules/nf-core/eido/validate/meta.yml @@ -12,7 +12,7 @@ tools: homepage: "http://eido.databio.org/en/latest/" documentation: "http://eido.databio.org/en/latest/" doi: "10.1093/gigascience/giab077" - licence: "BSD-2-Clause" + licence: ["BSD-2-Clause"] input: - samplesheet: type: file diff --git a/modules/nf-core/eido/validate/tests/main.nf.test b/modules/nf-core/eido/validate/tests/main.nf.test new file mode 100644 index 00000000000..7cbbbf5de77 --- /dev/null +++ b/modules/nf-core/eido/validate/tests/main.nf.test @@ -0,0 +1,64 @@ + +nextflow_process { + + name "Test Process EIDO_VALIDATE" + script "../main.nf" + process "EIDO_VALIDATE" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "eido" + tag "eido/validate" + + test("test-eido-validate-on-nextflow-samplesheet") { + + when { + process { + """ + input[0] = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/pep/test_nextflow_original_samplesheet.csv", checkIfExists: true) + input[1] = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/pep/test_samplesheet_schema.yaml", checkIfExists: true) + input[2] = [] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.log[0]).name, + process.out.versions + ).match() + } + ) + } + } + + test("test-eido-validate-on-pep-config") { + + when { + process { + """ + input[0] = file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/pep/test_pep_format_files/config.yaml", checkIfExists: true) + input[1] = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/pep/test_samplesheet_schema.yaml", checkIfExists: true) + input[2] = [] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.log[0]).name, + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/eido/validate/tests/main.nf.test.snap b/modules/nf-core/eido/validate/tests/main.nf.test.snap new file mode 100644 index 00000000000..5d64b46021e --- /dev/null +++ b/modules/nf-core/eido/validate/tests/main.nf.test.snap @@ -0,0 +1,28 @@ +{ + "test-eido-validate-on-pep-config": { + "content": [ + "validation.log", + [ + "versions.yml:md5,9a58d89818b4099d547bbaa9d2f2d8d9" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-28T14:41:24.013292" + }, + "test-eido-validate-on-nextflow-samplesheet": { + "content": [ + "validation.log", + [ + "versions.yml:md5,9a58d89818b4099d547bbaa9d2f2d8d9" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-28T14:41:16.791933" + } +} \ No newline at end of file diff --git a/modules/nf-core/eido/validate/tests/nextflow.config b/modules/nf-core/eido/validate/tests/nextflow.config new file mode 100644 index 00000000000..94652c3971c --- /dev/null +++ b/modules/nf-core/eido/validate/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'EIDO_VALIDATE' { + ext.args = '--st-index sample' + } +} diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index d22ffc6b7f2..e9ca3ef8115 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -247,9 +247,6 @@ ectyper: eido/convert: - modules/nf-core/eido/convert/** - tests/modules/nf-core/eido/convert/** -eido/validate: - - modules/nf-core/eido/validate/** - - tests/modules/nf-core/eido/validate/** eigenstratdatabasetools/eigenstratsnpcoverage: - modules/nf-core/eigenstratdatabasetools/eigenstratsnpcoverage/** - tests/modules/nf-core/eigenstratdatabasetools/eigenstratsnpcoverage/** diff --git a/tests/modules/nf-core/eido/validate/main.nf b/tests/modules/nf-core/eido/validate/main.nf deleted file mode 100644 index 3867adc123b..00000000000 --- a/tests/modules/nf-core/eido/validate/main.nf +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { EIDO_VALIDATE } from '../../../../../modules/nf-core/eido/validate/main.nf' - -workflow test_eido_validate_on_nextflow_samplesheet { - - samplesheet = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/pep/test_nextflow_original_samplesheet.csv", checkIfExists: true) - schema = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/pep/test_samplesheet_schema.yaml", checkIfExists: true) - pep_input_base_dir = [] - - EIDO_VALIDATE ( samplesheet, schema, pep_input_base_dir ) -} - -workflow test_eido_validate_on_pep_config { - - samplesheet = file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/pep/test_pep_format_files/config.yaml", checkIfExists: true) - schema = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/pep/test_samplesheet_schema.yaml", checkIfExists: true) - pep_input_base_dir = [] - - EIDO_VALIDATE ( samplesheet, schema, pep_input_base_dir ) -} diff --git a/tests/modules/nf-core/eido/validate/nextflow.config b/tests/modules/nf-core/eido/validate/nextflow.config deleted file mode 100644 index 47b626314c2..00000000000 --- a/tests/modules/nf-core/eido/validate/nextflow.config +++ /dev/null @@ -1,8 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: 'EIDO_VALIDATE' { - ext.args = '--st-index sample' - } - -} diff --git a/tests/modules/nf-core/eido/validate/test.yml b/tests/modules/nf-core/eido/validate/test.yml deleted file mode 100644 index f185c7fd172..00000000000 --- a/tests/modules/nf-core/eido/validate/test.yml +++ /dev/null @@ -1,15 +0,0 @@ -- name: eido validate test_eido_validate_on_nextflow_samplesheet - command: nextflow run ./tests/modules/nf-core/eido/validate -entry test_eido_validate_on_nextflow_samplesheet -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/eido/validate/nextflow.config - tags: - - eido/validate - - eido - files: - - path: output/eido/validation.log - -- name: eido validate test_eido_validate_on_pep_config - command: nextflow run ./tests/modules/nf-core/eido/validate -entry test_eido_validate_on_pep_config -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/eido/validate/nextflow.config - tags: - - eido/validate - - eido - files: - - path: output/eido/validation.log