Skip to content

Commit

Permalink
Revert "unzip stub, nf-test, snap"
Browse files Browse the repository at this point in the history
This reverts commit dec35aa.
  • Loading branch information
jennylsmith committed Mar 20, 2024
1 parent dec35aa commit e0d708e
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 75 deletions.
16 changes: 1 addition & 15 deletions modules/nf-core/unzip/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ process UNZIP {
script:
def args = task.ext.args ?: ''
if ( archive instanceof List && archive.name.size > 1 ) { error "[UNZIP] error: 7za only accepts a single archive as input. Please check module input." }

prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.baseName)
"""
7za \\
Expand All @@ -33,19 +34,4 @@ process UNZIP {
7za: \$(echo \$(7za --help) | sed 's/.*p7zip Version //; s/(.*//')
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
if ( archive instanceof List && archive.name.size > 1 ) { error "[UNZIP] error: 7za only accepts a single archive as input. Please check module input." }
prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.baseName)
"""
mkdir "${prefix}"
touch "${prefix}"/ncbi.map
touch "${prefix}"/ncbi.tre
cat <<-END_VERSIONS > versions.yml
"${task.process}":
7za: \$(echo \$(7za --help) | sed 's/.*p7zip Version //; s/(.*//')
END_VERSIONS
"""
}
58 changes: 0 additions & 58 deletions modules/nf-core/unzip/tests/main.nf.test

This file was deleted.

2 changes: 0 additions & 2 deletions modules/nf-core/unzip/tests/tags.yml

This file was deleted.

3 changes: 3 additions & 0 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,9 @@ universc:
untarfiles:
- modules/nf-core/untarfiles/**
- tests/modules/nf-core/untarfiles/**
unzip:
- modules/nf-core/unzip/**
- tests/modules/nf-core/unzip/**
unzipfiles:
- modules/nf-core/unzipfiles/**
- tests/modules/nf-core/unzipfiles/**
Expand Down
16 changes: 16 additions & 0 deletions tests/modules/nf-core/unzip/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env nextflow

nextflow.enable.dsl = 2

include { UNZIP } from '../../../../modules/nf-core/unzip/main.nf'

workflow test_unzip {

archive = [
[],
file(params.test_data['sarscov2']['genome']['ncbi_taxmap_zip'], checkIfExists: true)
]

UNZIP ( archive )
}

5 changes: 5 additions & 0 deletions tests/modules/nf-core/unzip/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

}
11 changes: 11 additions & 0 deletions tests/modules/nf-core/unzip/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- name: unzip test_unzip
command: nextflow run ./tests/modules/nf-core/unzip -entry test_unzip -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/unzip/nextflow.config
tags:
- unzip
files:
- path: output/unzip/ncbi_taxmap/
- path: output/unzip/ncbi_taxmap/ncbi.map
md5sum: de30dbba85f9070612b632e2a5a95952
- path: output/unzip/ncbi_taxmap/ncbi.tre
md5sum: 4029dd2091c685b9a86ddd9d0d870db0
- path: output/unzip/versions.yml

0 comments on commit e0d708e

Please sign in to comment.