Skip to content

Commit 5946aa3

Browse files
committed
NextflowRunner: Automatically convert integers to doubles when argument type is double
1 parent ea6e6f4 commit 5946aa3

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Viash 0.8.8 (xxxx-xx-xx): xxxx
2+
3+
## BUG FIXES
4+
5+
* `NextflowRunner`: Automatically convert integers to doubles when argument type is `double` (PR #xxx).
6+
17
# Viash 0.8.7 (2025-04-01): Backport support upcoming version of Nextflow
28

39
The upcoming release of Nextflow introduces a new class for loading scripts and renamed the old class.

src/main/resources/io/viash/platforms/nextflow/arguments/_checkArgumentType.nf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ def _checkArgumentType(String stage, Map par, Object value, String errorIdentifi
112112
if (value instanceof Float) {
113113
value = value.toDouble()
114114
}
115+
if (value instanceof Integer) {
116+
value = value.toDouble()
117+
}
115118
expectedClass = value instanceof Double ? null : "Double"
116119
} else if (par.type == "boolean" | par.type == "boolean_true" | par.type == "boolean_false") {
117120
// cast to boolean if need be

0 commit comments

Comments
 (0)