Skip to content

Commit 3150810

Browse files
committed
use versions
1 parent bb2ce33 commit 3150810

File tree

3 files changed

+27
-17
lines changed

3 files changed

+27
-17
lines changed

modules/nf-core/oncocnv/main.nf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ process ONCOCNV {
6666
cat <<-END_VERSIONS > versions.yml
6767
"${task.process}":
6868
oncocnv: $VERSION
69-
perl: \$(perl --version | grep 'This is perl' | sed 's/.*(v//g' | sed 's/)//g')
70-
r: \$(R --version | grep "R version" | sed 's/R version //g')
69+
perl: \$(perl --version | grep 'This is perl' | sed -E 's/.*v([0-9]+\\.[0-9]+\\.[0-9]+).*/\\1/')
70+
r: \$(R --version | grep "R version" | sed -E 's/R version ([0-9]+\\.[0-9]+\\.[0-9]+).*/\\1/')
7171
END_VERSIONS
7272
"""
7373

@@ -82,8 +82,8 @@ process ONCOCNV {
8282
cat <<-END_VERSIONS > versions.yml
8383
"${task.process}":
8484
oncocnv: $VERSION
85-
perl: \$(perl --version | grep 'This is perl' | sed 's/.*(v//g' | sed 's/)//g')
86-
r: \$(R --version | grep "R version" | sed 's/R version //g')
85+
perl: \$(perl --version | grep 'This is perl' | sed -E 's/.*v([0-9]+\\.[0-9]+\\.[0-9]+).*/\\1/')
86+
r: \$(R --version | grep "R version" | sed -E 's/R version ([0-9]+\\.[0-9]+\\.[0-9]+).*/\\1/')
8787
END_VERSIONS
8888
"""
8989
}

modules/nf-core/oncocnv/tests/main.nf.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ nextflow_process {
8282
then {
8383
assertAll(
8484
{ assert process.success },
85-
{ assert snapshot(process.out).match() }
85+
{ assert snapshot(
86+
process.out,
87+
path(process.out.versions[0]).yaml
88+
).match() }
8689
)
8790
}
8891

modules/nf-core/oncocnv/tests/main.nf.test.snap

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
]
3131
],
3232
"3": [
33-
"versions.yml:md5,be20246b45f9c84d7625dcc76b8451f2"
33+
"versions.yml:md5,da4305b1e78b5eb47b932ac5b08be0ab"
3434
],
3535
"png": [
3636
[
@@ -60,42 +60,49 @@
6060
]
6161
],
6262
"versions": [
63-
"versions.yml:md5,be20246b45f9c84d7625dcc76b8451f2"
63+
"versions.yml:md5,da4305b1e78b5eb47b932ac5b08be0ab"
6464
]
65+
},
66+
{
67+
"ONCOCNV": {
68+
"oncocnv": 7.0,
69+
"perl": "5.30.0",
70+
"r": "3.6.3"
71+
}
6572
}
6673
],
6774
"meta": {
6875
"nf-test": "0.9.2",
6976
"nextflow": "24.10.4"
7077
},
71-
"timestamp": "2025-05-21T13:35:00.752831"
78+
"timestamp": "2025-05-21T15:41:03.943617"
7279
},
7380
"human - bam": {
7481
"content": [
7582
{
7683
"0": [
77-
84+
7885
],
7986
"1": [
80-
87+
8188
],
8289
"2": [
83-
90+
8491
],
8592
"3": [
86-
93+
8794
],
8895
"png": [
89-
96+
9097
],
9198
"profile": [
92-
99+
93100
],
94101
"summary": [
95-
102+
96103
],
97104
"versions": [
98-
105+
99106
]
100107
}
101108
],
@@ -105,4 +112,4 @@
105112
},
106113
"timestamp": "2025-05-21T13:34:52.08932"
107114
}
108-
}
115+
}

0 commit comments

Comments
 (0)