forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHORES: Move pytest to nf-test for sratools/prefetch (nf-core#3938)
* move nf_test modules.yml file to .github/ * update and sort file * use /tmp * add tests for prefetch * remove pytest for sratools/prefetch * Update modules.yml
- Loading branch information
Showing
10 changed files
with
181 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ fastqc: | |
|
||
snakemake: | ||
- modules/nf-core/snakemake/** | ||
|
||
sratools/prefetch: | ||
- modules/nf-core/sratools/prefetch/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
*.code-workspace | ||
*.pyc | ||
*.pyo | ||
.*.sw? | ||
.DS_Store | ||
.nextflow* | ||
work/ | ||
results/ | ||
test_output/ | ||
.nf-test.log | ||
.nf-test/ | ||
output/ | ||
.DS_Store | ||
*.code-workspace | ||
tests/data/ | ||
.screenrc | ||
.*.sw? | ||
__pycache__ | ||
*.pyo | ||
*.pyc | ||
output/ | ||
results/ | ||
test.xml | ||
test_output/ | ||
tests/data/ | ||
work/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
nextflow_process { | ||
|
||
name "Test Process SRATOOLS_PREFETCH" | ||
script "modules/nf-core/sratools/prefetch/main.nf" | ||
process "SRATOOLS_PREFETCH" | ||
tag "sratools/prefetch" | ||
tag "modules_nfcore" | ||
|
||
test("sratools/prefetch") { | ||
|
||
when { | ||
params { | ||
outdir = "output" | ||
} | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], 'DRR000774' ] | ||
input[1] = file(params.test_data['generic']['config']['ncbi_user_settings']) | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot(process).match() } | ||
) | ||
} | ||
} | ||
|
||
test("sratools/prefetch with sralite") { | ||
|
||
when { | ||
params { | ||
outdir = "output" | ||
} | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], 'SRR1170046' ] | ||
input[1] = file(params.test_data['generic']['config']['ncbi_user_settings']) | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot(process).match() } | ||
) | ||
} | ||
} | ||
} |
110 changes: 110 additions & 0 deletions
110
modules/nf-core/sratools/prefetch/tests/main.nf.test.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"sratools/prefetch with sralite": { | ||
"content": [ | ||
{ | ||
"stderr": [ | ||
|
||
], | ||
"errorReport": null, | ||
"exitStatus": 0, | ||
"out": { | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
[ | ||
"SRR1170046.sralite:md5,7acfce556ca0951aff49d780899c105b" | ||
] | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,c967dea4135cb75490e1e801c4639efc" | ||
], | ||
"sra": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
[ | ||
"SRR1170046.sralite:md5,7acfce556ca0951aff49d780899c105b" | ||
] | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,c967dea4135cb75490e1e801c4639efc" | ||
] | ||
}, | ||
"failed": false, | ||
"stdout": [ | ||
|
||
], | ||
"errorMessage": null, | ||
"trace": { | ||
"tasksFailed": 0, | ||
"tasksCount": 1, | ||
"tasksSucceeded": 1 | ||
}, | ||
"name": "SRATOOLS_PREFETCH", | ||
"success": true | ||
} | ||
], | ||
"timestamp": "2023-10-10T10:00:01.515299" | ||
}, | ||
"sratools/prefetch": { | ||
"content": [ | ||
{ | ||
"stderr": [ | ||
|
||
], | ||
"errorReport": null, | ||
"exitStatus": 0, | ||
"out": { | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
[ | ||
"DRR000774.sra:md5,7647dba20c89c0e3d7ad13842f060eb0" | ||
] | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,c967dea4135cb75490e1e801c4639efc" | ||
], | ||
"sra": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
[ | ||
"DRR000774.sra:md5,7647dba20c89c0e3d7ad13842f060eb0" | ||
] | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,c967dea4135cb75490e1e801c4639efc" | ||
] | ||
}, | ||
"failed": false, | ||
"stdout": [ | ||
|
||
], | ||
"errorMessage": null, | ||
"trace": { | ||
"tasksFailed": 0, | ||
"tasksCount": 1, | ||
"tasksSucceeded": 1 | ||
}, | ||
"name": "SRATOOLS_PREFETCH", | ||
"success": true | ||
} | ||
], | ||
"timestamp": "2023-10-10T09:58:01.781848" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.