Skip to content

Commit

Permalink
Merge pull request #588 from viash-io/develop_0_8
Browse files Browse the repository at this point in the history
Develop 0 8
  • Loading branch information
Grifs authored Nov 20, 2023
2 parents 36b3149 + 6ad6f63 commit cc18870
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Viash 0.8.1 (2023-11-20): Minor bug fix to Nextflow workflows

This release fixes a bug in the Nextflow platform where calling a workflow with the `.run()` function without specifying the `fromState` argument would result in an error when the input channel contained tuples with more than two elements.

## BUG FIXES

`NextflowPlatform`: Fix error when using `.run()` without using `fromState` and the input channel holds tuples with more than two elements (PR #587).

# Viash 0.8.0 (2023-10-23): Nextflow workflows and dependencies

Nextflow workflows definitions are picked up by Viash and assembled into a functional Nextflow workflow, reducing the amount of boilerplate code needed to be written by the user.
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "viash"

version := "0.8.0"
version := "0.8.1"

scalaVersion := "2.13.10"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
def new_data = workflowArgs.fromState(it.take(2))
[it[0], new_data]
} :
chRun
chRun | map {tup -> tup.take(2)}

// fill in defaults
chArgsWithDefaults = chArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ workflow base {
file = tempFile()
file.write("num: $num")

["num$num", [ num: num, file: file ]]
["num$num", [ file: file ], ["num": num]]
}
| sub_workflow.run(
fromState: ["file": "file"],
toState: {id, output, state ->
def newState = [
"step1_output": output.output,
Expand All @@ -22,8 +21,8 @@ workflow base {
return newState
}
)
| view{ id, state ->
def num = state.num
| view{ id, state, extra ->
def num = extra.num

// check id
assert id == "num$num": "id should be 'num$num'. Found: '$id'"
Expand Down

0 comments on commit cc18870

Please sign in to comment.