diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e271d2..5ad7192 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# craftbox x.x.x +# craftbox 0.1.0 ## NEW FEATURES diff --git a/_viash.yaml b/_viash.yaml index 4b02f50..204a056 100644 --- a/_viash.yaml +++ b/_viash.yaml @@ -7,7 +7,7 @@ links: issue_tracker: https://github.com/viash-hub/craftbox/issues repository: https://github.com/viash-hub/craftbox -viash_version: 0.9.0-RC7 +viash_version: 0.9.0 config_mods: | .requirements.commands := ['ps'] diff --git a/target/executable/concat_text/.config.vsh.yaml b/target/executable/concat_text/.config.vsh.yaml index fee9588..deda6e4 100644 --- a/target/executable/concat_text/.config.vsh.yaml +++ b/target/executable/concat_text/.config.vsh.yaml @@ -170,15 +170,15 @@ build_info: engine: "docker|native" output: "target/executable/concat_text" executable: "target/executable/concat_text/concat_text" - viash_version: "0.9.0-RC7" - git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295" + viash_version: "0.9.0" + git_commit: "3fecd6a214295592c65d5ef03b8b7115867f8752" git_remote: "https://github.com/viash-hub/craftbox" package_config: name: "craftbox" version: "main" description: "A collection of custom-tailored scripts and applied tools.\n" info: null - viash_version: "0.9.0-RC7" + viash_version: "0.9.0" source: "src" target: "target" config_mods: diff --git a/target/executable/concat_text/concat_text b/target/executable/concat_text/concat_text index c47df6d..8a6d52e 100755 --- a/target/executable/concat_text/concat_text +++ b/target/executable/concat_text/concat_text @@ -2,9 +2,9 @@ # concat_text main # -# This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a -# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from -# Data Intuitive. +# This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative +# work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data +# Intuitive. # # The component may contain files which fall under a different license. The # authors of this component should specify the license in the header of such @@ -479,9 +479,9 @@ RUN apk add --no-cache bash procps file LABEL org.opencontainers.image.authors="Toni Verbeiren, Dries Schaumont" LABEL org.opencontainers.image.description="Companion container for running component concat_text" -LABEL org.opencontainers.image.created="2024-09-12T15:41:16Z" +LABEL org.opencontainers.image.created="2024-09-12T15:58:08Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox" -LABEL org.opencontainers.image.revision="5705b88fa20f267475b5d0ae1ca25dbf55ff1295" +LABEL org.opencontainers.image.revision="3fecd6a214295592c65d5ef03b8b7115867f8752" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/csv2fasta/.config.vsh.yaml b/target/executable/csv2fasta/.config.vsh.yaml index 38b6567..885db2a 100644 --- a/target/executable/csv2fasta/.config.vsh.yaml +++ b/target/executable/csv2fasta/.config.vsh.yaml @@ -221,15 +221,15 @@ build_info: engine: "docker|native" output: "target/executable/csv2fasta" executable: "target/executable/csv2fasta/csv2fasta" - viash_version: "0.9.0-RC7" - git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295" + viash_version: "0.9.0" + git_commit: "3fecd6a214295592c65d5ef03b8b7115867f8752" git_remote: "https://github.com/viash-hub/craftbox" package_config: name: "craftbox" version: "main" description: "A collection of custom-tailored scripts and applied tools.\n" info: null - viash_version: "0.9.0-RC7" + viash_version: "0.9.0" source: "src" target: "target" config_mods: diff --git a/target/executable/csv2fasta/csv2fasta b/target/executable/csv2fasta/csv2fasta index 9636d65..bf97151 100755 --- a/target/executable/csv2fasta/csv2fasta +++ b/target/executable/csv2fasta/csv2fasta @@ -2,9 +2,9 @@ # csv2fasta main # -# This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a -# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from -# Data Intuitive. +# This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative +# work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data +# Intuitive. # # The component may contain files which fall under a different license. The # authors of this component should specify the license in the header of such @@ -525,9 +525,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "dnaio" LABEL org.opencontainers.image.description="Companion container for running component csv2fasta" -LABEL org.opencontainers.image.created="2024-09-12T15:41:15Z" +LABEL org.opencontainers.image.created="2024-09-12T15:58:07Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox" -LABEL org.opencontainers.image.revision="5705b88fa20f267475b5d0ae1ca25dbf55ff1295" +LABEL org.opencontainers.image.revision="3fecd6a214295592c65d5ef03b8b7115867f8752" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/untar/.config.vsh.yaml b/target/executable/untar/.config.vsh.yaml index ac4ee5c..02fdc54 100644 --- a/target/executable/untar/.config.vsh.yaml +++ b/target/executable/untar/.config.vsh.yaml @@ -146,15 +146,15 @@ build_info: engine: "docker|native" output: "target/executable/untar" executable: "target/executable/untar/untar" - viash_version: "0.9.0-RC7" - git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295" + viash_version: "0.9.0" + git_commit: "3fecd6a214295592c65d5ef03b8b7115867f8752" git_remote: "https://github.com/viash-hub/craftbox" package_config: name: "craftbox" version: "main" description: "A collection of custom-tailored scripts and applied tools.\n" info: null - viash_version: "0.9.0-RC7" + viash_version: "0.9.0" source: "src" target: "target" config_mods: diff --git a/target/executable/untar/untar b/target/executable/untar/untar index ca4f140..2604914 100755 --- a/target/executable/untar/untar +++ b/target/executable/untar/untar @@ -2,9 +2,9 @@ # untar main # -# This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a -# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from -# Data Intuitive. +# This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative +# work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data +# Intuitive. # # The component may contain files which fall under a different license. The # authors of this component should specify the license in the header of such @@ -476,9 +476,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* LABEL org.opencontainers.image.description="Companion container for running component untar" -LABEL org.opencontainers.image.created="2024-09-12T15:41:15Z" +LABEL org.opencontainers.image.created="2024-09-12T15:58:07Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox" -LABEL org.opencontainers.image.revision="5705b88fa20f267475b5d0ae1ca25dbf55ff1295" +LABEL org.opencontainers.image.revision="3fecd6a214295592c65d5ef03b8b7115867f8752" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/nextflow/concat_text/.config.vsh.yaml b/target/nextflow/concat_text/.config.vsh.yaml index eb5770a..0e08e6b 100644 --- a/target/nextflow/concat_text/.config.vsh.yaml +++ b/target/nextflow/concat_text/.config.vsh.yaml @@ -170,15 +170,15 @@ build_info: engine: "docker|native" output: "target/nextflow/concat_text" executable: "target/nextflow/concat_text/main.nf" - viash_version: "0.9.0-RC7" - git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295" + viash_version: "0.9.0" + git_commit: "3fecd6a214295592c65d5ef03b8b7115867f8752" git_remote: "https://github.com/viash-hub/craftbox" package_config: name: "craftbox" version: "main" description: "A collection of custom-tailored scripts and applied tools.\n" info: null - viash_version: "0.9.0-RC7" + viash_version: "0.9.0" source: "src" target: "target" config_mods: diff --git a/target/nextflow/concat_text/main.nf b/target/nextflow/concat_text/main.nf index e78e522..13981b2 100644 --- a/target/nextflow/concat_text/main.nf +++ b/target/nextflow/concat_text/main.nf @@ -1,8 +1,8 @@ // concat_text main // -// This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a -// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from -// Data Intuitive. +// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative +// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data +// Intuitive. // // The component may contain files which fall under a different license. The // authors of this component should specify the license in the header of such @@ -1732,7 +1732,9 @@ def publishStates(Map args) { def yamlFilename = yamlTemplate_ .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) // TODO: do the pathnames in state_ match up with the outputFilenames_? @@ -1803,7 +1805,9 @@ def publishStatesByConfig(Map args) { def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml' def yamlFilename = yamlTemplate .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent() // the processed state is a list of [key, value, inputPath, outputFilename] tuples, where @@ -1845,7 +1849,9 @@ def publishStatesByConfig(Map args) { // instantiate the template def filename = filenameTemplate .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) if (par.multiple) { // if the parameter is multiple: true, the filename // should contain a wildcard '*' that is replaced with @@ -3024,15 +3030,15 @@ meta = [ "runner" : "nextflow", "engine" : "docker|native", "output" : "target/nextflow/concat_text", - "viash_version" : "0.9.0-RC7", - "git_commit" : "5705b88fa20f267475b5d0ae1ca25dbf55ff1295", + "viash_version" : "0.9.0", + "git_commit" : "3fecd6a214295592c65d5ef03b8b7115867f8752", "git_remote" : "https://github.com/viash-hub/craftbox" }, "package_config" : { "name" : "craftbox", "version" : "main", "description" : "A collection of custom-tailored scripts and applied tools.\n", - "viash_version" : "0.9.0-RC7", + "viash_version" : "0.9.0", "source" : "src", "target" : "target", "config_mods" : [ @@ -3204,7 +3210,11 @@ def vdsl3WorkflowFactory(Map args, Map meta, String rawScript) { val = val.join(par.multiple_sep) } if (par.direction == "output" && par.type == "file") { - val = val.replaceAll('\\$id', id).replaceAll('\\$key', key) + val = val + .replaceAll('\\$id', id) + .replaceAll('\\$\\{id\\}', id) + .replaceAll('\\$key', key) + .replaceAll('\\$\\{key\\}', key) } [parName, val] } @@ -3335,7 +3345,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { def createParentStr = meta.config.allArguments .findAll { it.type == "file" && it.direction == "output" && it.create_parent } .collect { par -> - "\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent \\\"\" + (args[\"${par.plainName}\"] instanceof String ? args[\"${par.plainName}\"] : args[\"${par.plainName}\"].join('\" \"')) + \"\\\"\" : \"\" }" + def contents = "args[\"${par.plainName}\"] instanceof List ? args[\"${par.plainName}\"].join('\" \"') : args[\"${par.plainName}\"]" + "\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent '\" + escapeText(${contents}) + \"'\" : \"\" }" } .join("\n") @@ -3343,8 +3354,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { def inputFileExports = meta.config.allArguments .findAll { it.type == "file" && it.direction.toLowerCase() == "input" } .collect { par -> - def viash_par_contents = "(viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName})" - "\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}=\\\"\" + ${viash_par_contents} + \"\\\"\"}" + def contents = "viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName}" + "\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}='\" + escapeText(${contents}) + \"'\"}" } // NOTE: if using docker, use /tmp instead of tmpDir! @@ -3381,6 +3392,7 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { def procStr = """nextflow.enable.dsl=2 | + |def escapeText = { s -> s.toString().replaceAll("'", "'\\\"'\\\"'") } |process $procKey {$drctvStrs |input: | tuple val(id)$inputPaths, val(args), path(resourcesDir, stageAs: ".viash_meta_resources") @@ -3392,10 +3404,9 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { |$stub |\"\"\" |script:$assertStr - |def escapeText = { s -> s.toString().replaceAll('([`"])', '\\\\\\\\\$1') } |def parInject = args | .findAll{key, value -> value != null} - | .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}=\\\"\${escapeText(value)}\\\""} + | .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}='\${escapeText(value)}'"} | .join("\\n") |\"\"\" |# meta exports diff --git a/target/nextflow/csv2fasta/.config.vsh.yaml b/target/nextflow/csv2fasta/.config.vsh.yaml index 9eadfc5..b0a0f0d 100644 --- a/target/nextflow/csv2fasta/.config.vsh.yaml +++ b/target/nextflow/csv2fasta/.config.vsh.yaml @@ -221,15 +221,15 @@ build_info: engine: "docker|native" output: "target/nextflow/csv2fasta" executable: "target/nextflow/csv2fasta/main.nf" - viash_version: "0.9.0-RC7" - git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295" + viash_version: "0.9.0" + git_commit: "3fecd6a214295592c65d5ef03b8b7115867f8752" git_remote: "https://github.com/viash-hub/craftbox" package_config: name: "craftbox" version: "main" description: "A collection of custom-tailored scripts and applied tools.\n" info: null - viash_version: "0.9.0-RC7" + viash_version: "0.9.0" source: "src" target: "target" config_mods: diff --git a/target/nextflow/csv2fasta/main.nf b/target/nextflow/csv2fasta/main.nf index 9c9b7d1..af2f455 100644 --- a/target/nextflow/csv2fasta/main.nf +++ b/target/nextflow/csv2fasta/main.nf @@ -1,8 +1,8 @@ // csv2fasta main // -// This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a -// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from -// Data Intuitive. +// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative +// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data +// Intuitive. // // The component may contain files which fall under a different license. The // authors of this component should specify the license in the header of such @@ -1728,7 +1728,9 @@ def publishStates(Map args) { def yamlFilename = yamlTemplate_ .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) // TODO: do the pathnames in state_ match up with the outputFilenames_? @@ -1799,7 +1801,9 @@ def publishStatesByConfig(Map args) { def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml' def yamlFilename = yamlTemplate .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent() // the processed state is a list of [key, value, inputPath, outputFilename] tuples, where @@ -1841,7 +1845,9 @@ def publishStatesByConfig(Map args) { // instantiate the template def filename = filenameTemplate .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) if (par.multiple) { // if the parameter is multiple: true, the filename // should contain a wildcard '*' that is replaced with @@ -3060,15 +3066,15 @@ meta = [ "runner" : "nextflow", "engine" : "docker|native", "output" : "target/nextflow/csv2fasta", - "viash_version" : "0.9.0-RC7", - "git_commit" : "5705b88fa20f267475b5d0ae1ca25dbf55ff1295", + "viash_version" : "0.9.0", + "git_commit" : "3fecd6a214295592c65d5ef03b8b7115867f8752", "git_remote" : "https://github.com/viash-hub/craftbox" }, "package_config" : { "name" : "craftbox", "version" : "main", "description" : "A collection of custom-tailored scripts and applied tools.\n", - "viash_version" : "0.9.0-RC7", + "viash_version" : "0.9.0", "source" : "src", "target" : "target", "config_mods" : [ @@ -3316,7 +3322,11 @@ def vdsl3WorkflowFactory(Map args, Map meta, String rawScript) { val = val.join(par.multiple_sep) } if (par.direction == "output" && par.type == "file") { - val = val.replaceAll('\\$id', id).replaceAll('\\$key', key) + val = val + .replaceAll('\\$id', id) + .replaceAll('\\$\\{id\\}', id) + .replaceAll('\\$key', key) + .replaceAll('\\$\\{key\\}', key) } [parName, val] } @@ -3447,7 +3457,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { def createParentStr = meta.config.allArguments .findAll { it.type == "file" && it.direction == "output" && it.create_parent } .collect { par -> - "\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent \\\"\" + (args[\"${par.plainName}\"] instanceof String ? args[\"${par.plainName}\"] : args[\"${par.plainName}\"].join('\" \"')) + \"\\\"\" : \"\" }" + def contents = "args[\"${par.plainName}\"] instanceof List ? args[\"${par.plainName}\"].join('\" \"') : args[\"${par.plainName}\"]" + "\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent '\" + escapeText(${contents}) + \"'\" : \"\" }" } .join("\n") @@ -3455,8 +3466,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { def inputFileExports = meta.config.allArguments .findAll { it.type == "file" && it.direction.toLowerCase() == "input" } .collect { par -> - def viash_par_contents = "(viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName})" - "\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}=\\\"\" + ${viash_par_contents} + \"\\\"\"}" + def contents = "viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName}" + "\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}='\" + escapeText(${contents}) + \"'\"}" } // NOTE: if using docker, use /tmp instead of tmpDir! @@ -3493,6 +3504,7 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { def procStr = """nextflow.enable.dsl=2 | + |def escapeText = { s -> s.toString().replaceAll("'", "'\\\"'\\\"'") } |process $procKey {$drctvStrs |input: | tuple val(id)$inputPaths, val(args), path(resourcesDir, stageAs: ".viash_meta_resources") @@ -3504,10 +3516,9 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { |$stub |\"\"\" |script:$assertStr - |def escapeText = { s -> s.toString().replaceAll('([`"])', '\\\\\\\\\$1') } |def parInject = args | .findAll{key, value -> value != null} - | .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}=\\\"\${escapeText(value)}\\\""} + | .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}='\${escapeText(value)}'"} | .join("\\n") |\"\"\" |# meta exports diff --git a/target/nextflow/untar/.config.vsh.yaml b/target/nextflow/untar/.config.vsh.yaml index fa909b1..1ba3cbf 100644 --- a/target/nextflow/untar/.config.vsh.yaml +++ b/target/nextflow/untar/.config.vsh.yaml @@ -146,15 +146,15 @@ build_info: engine: "docker|native" output: "target/nextflow/untar" executable: "target/nextflow/untar/main.nf" - viash_version: "0.9.0-RC7" - git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295" + viash_version: "0.9.0" + git_commit: "3fecd6a214295592c65d5ef03b8b7115867f8752" git_remote: "https://github.com/viash-hub/craftbox" package_config: name: "craftbox" version: "main" description: "A collection of custom-tailored scripts and applied tools.\n" info: null - viash_version: "0.9.0-RC7" + viash_version: "0.9.0" source: "src" target: "target" config_mods: diff --git a/target/nextflow/untar/main.nf b/target/nextflow/untar/main.nf index 6396ab8..9d6caf7 100644 --- a/target/nextflow/untar/main.nf +++ b/target/nextflow/untar/main.nf @@ -1,8 +1,8 @@ // untar main // -// This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a -// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from -// Data Intuitive. +// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative +// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data +// Intuitive. // // The component may contain files which fall under a different license. The // authors of this component should specify the license in the header of such @@ -1728,7 +1728,9 @@ def publishStates(Map args) { def yamlFilename = yamlTemplate_ .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) // TODO: do the pathnames in state_ match up with the outputFilenames_? @@ -1799,7 +1801,9 @@ def publishStatesByConfig(Map args) { def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml' def yamlFilename = yamlTemplate .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent() // the processed state is a list of [key, value, inputPath, outputFilename] tuples, where @@ -1841,7 +1845,9 @@ def publishStatesByConfig(Map args) { // instantiate the template def filename = filenameTemplate .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) if (par.multiple) { // if the parameter is multiple: true, the filename // should contain a wildcard '*' that is replaced with @@ -2981,15 +2987,15 @@ meta = [ "runner" : "nextflow", "engine" : "docker|native", "output" : "target/nextflow/untar", - "viash_version" : "0.9.0-RC7", - "git_commit" : "5705b88fa20f267475b5d0ae1ca25dbf55ff1295", + "viash_version" : "0.9.0", + "git_commit" : "3fecd6a214295592c65d5ef03b8b7115867f8752", "git_remote" : "https://github.com/viash-hub/craftbox" }, "package_config" : { "name" : "craftbox", "version" : "main", "description" : "A collection of custom-tailored scripts and applied tools.\n", - "viash_version" : "0.9.0-RC7", + "viash_version" : "0.9.0", "source" : "src", "target" : "target", "config_mods" : [ @@ -3167,7 +3173,11 @@ def vdsl3WorkflowFactory(Map args, Map meta, String rawScript) { val = val.join(par.multiple_sep) } if (par.direction == "output" && par.type == "file") { - val = val.replaceAll('\\$id', id).replaceAll('\\$key', key) + val = val + .replaceAll('\\$id', id) + .replaceAll('\\$\\{id\\}', id) + .replaceAll('\\$key', key) + .replaceAll('\\$\\{key\\}', key) } [parName, val] } @@ -3298,7 +3308,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { def createParentStr = meta.config.allArguments .findAll { it.type == "file" && it.direction == "output" && it.create_parent } .collect { par -> - "\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent \\\"\" + (args[\"${par.plainName}\"] instanceof String ? args[\"${par.plainName}\"] : args[\"${par.plainName}\"].join('\" \"')) + \"\\\"\" : \"\" }" + def contents = "args[\"${par.plainName}\"] instanceof List ? args[\"${par.plainName}\"].join('\" \"') : args[\"${par.plainName}\"]" + "\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent '\" + escapeText(${contents}) + \"'\" : \"\" }" } .join("\n") @@ -3306,8 +3317,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { def inputFileExports = meta.config.allArguments .findAll { it.type == "file" && it.direction.toLowerCase() == "input" } .collect { par -> - def viash_par_contents = "(viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName})" - "\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}=\\\"\" + ${viash_par_contents} + \"\\\"\"}" + def contents = "viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName}" + "\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}='\" + escapeText(${contents}) + \"'\"}" } // NOTE: if using docker, use /tmp instead of tmpDir! @@ -3344,6 +3355,7 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { def procStr = """nextflow.enable.dsl=2 | + |def escapeText = { s -> s.toString().replaceAll("'", "'\\\"'\\\"'") } |process $procKey {$drctvStrs |input: | tuple val(id)$inputPaths, val(args), path(resourcesDir, stageAs: ".viash_meta_resources") @@ -3355,10 +3367,9 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { |$stub |\"\"\" |script:$assertStr - |def escapeText = { s -> s.toString().replaceAll('([`"])', '\\\\\\\\\$1') } |def parInject = args | .findAll{key, value -> value != null} - | .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}=\\\"\${escapeText(value)}\\\""} + | .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}='\${escapeText(value)}'"} | .join("\\n") |\"\"\" |# meta exports