Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added basicpy nftest #7228

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/conda_skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ exclude:
path: modules/nf-core/bakta/baktadbdownload
- profile: conda
path: modules/nf-core/bases2fastq
- profile: conda
path: modules/nf-core/basicpy
- profile: conda
path: modules/nf-core/bcl2fastq
- profile: conda
Expand Down Expand Up @@ -184,7 +186,7 @@ exclude:
path: modules/nf-core/xeniumranger/import-segmentation
- profile: conda
path: modules/nf-core/parabricks/mutectcaller
- profile: conda
- profile: conda
path: modules/nf-core/parabricks/dbsnp
- profile: conda
path: modules/nf-core/parabricks/indexgvcf
Expand Down
3 changes: 0 additions & 3 deletions modules/nf-core/basicpy/environment.yml

This file was deleted.

10 changes: 6 additions & 4 deletions modules/nf-core/basicpy/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ process BASICPY {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "Basicpy module does not support Conda. Please use Docker / Singularity instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "1.2.0-patch1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping
"""
/opt/main.py -i $image -o . $args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
basicpy:: $VERSION
basicpy: $VERSION
END_VERSIONS
"""

Expand All @@ -36,13 +36,15 @@ process BASICPY {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "Basicpy module does not support Conda. Please use Docker / Singularity instead."
}
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "1.2.0-patch1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping
"""
touch ${prefix}.-dfp.tiff
touch ${prefix}.-dfp.tiff

cat <<-END_VERSIONS > versions.yml
"${task.process}":
basicpy:: $VERSION
basicpy: $VERSION
END_VERSIONS
"""
}
57 changes: 57 additions & 0 deletions modules/nf-core/basicpy/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
nextflow_process {

name "Test Process BASICPY"
script "../main.nf"
process "BASICPY"

tag "modules"
tag "modules_nfcore"
tag "basicpy"

test("basicpy - OME-TIFF") {

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif', checkIfExists: true),
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}

test("basicpy - OME-TIFF - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif', checkIfExists: true),
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}

}
74 changes: 74 additions & 0 deletions modules/nf-core/basicpy/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"basicpy - OME-TIFF": {
"content": [
{
"0": [
[
{
"id": "test"
},
[
"cycif-tonsil-cycle1.ome-dfp.tiff:md5,ed8e02bbd04d694ff5a5f289f48f97ab",
"cycif-tonsil-cycle1.ome-ffp.tiff:md5,e1a1a2398ef5b76110db6114541f7511"
]
]
],
"1": [
"versions.yml:md5,1391fd5a5745a20016f9824467273113"
],
"fields": [
[
{
"id": "test"
},
[
"cycif-tonsil-cycle1.ome-dfp.tiff:md5,ed8e02bbd04d694ff5a5f289f48f97ab",
"cycif-tonsil-cycle1.ome-ffp.tiff:md5,e1a1a2398ef5b76110db6114541f7511"
]
]
],
"versions": [
"versions.yml:md5,1391fd5a5745a20016f9824467273113"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-12-16T10:57:29.262528119"
},
"basicpy - OME-TIFF - stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.-dfp.tiff:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,1391fd5a5745a20016f9824467273113"
],
"fields": [
[
{
"id": "test"
},
"test.-dfp.tiff:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,1391fd5a5745a20016f9824467273113"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-12-16T10:57:35.685056461"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ bamtools/convert:
bamtools/split:
- modules/nf-core/bamtools/split/**
- tests/modules/nf-core/bamtools/split/**
basicpy:
- modules/nf-core/basicpy/**
- tests/modules/nf-core/basicpy/**
bbmap/align:
- modules/nf-core/bbmap/align/**
- tests/modules/nf-core/bbmap/align/**
Expand Down
15 changes: 0 additions & 15 deletions tests/modules/nf-core/basicpy/main.nf

This file was deleted.

5 changes: 0 additions & 5 deletions tests/modules/nf-core/basicpy/nextflow.config

This file was deleted.

8 changes: 0 additions & 8 deletions tests/modules/nf-core/basicpy/test.yml

This file was deleted.

Loading