From 779c2d425f273680f818ed56c84015da63cf9b75 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Thu, 8 Sep 2016 15:09:06 -0400 Subject: [PATCH 1/2] Add test for embedded subworkflow --- v1.0/conformance_test_v1.0.yaml | 5 +++++ v1.0/v1.0/count-lines10-wf.cwl | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100755 v1.0/v1.0/count-lines10-wf.cwl diff --git a/v1.0/conformance_test_v1.0.yaml b/v1.0/conformance_test_v1.0.yaml index 21377bb14..ce9f16f01 100644 --- a/v1.0/conformance_test_v1.0.yaml +++ b/v1.0/conformance_test_v1.0.yaml @@ -883,3 +883,8 @@ "size": 12010 tool: v1.0/initialworkdirrequirement-docker-out.cwl doc: Test output of InitialWorkDir + +- job: v1.0/wc-job.json + output: {count_output: 16} + tool: v1.0/count-lines10-wf.cwl + doc: Test embedded subworkflow diff --git a/v1.0/v1.0/count-lines10-wf.cwl b/v1.0/v1.0/count-lines10-wf.cwl new file mode 100755 index 000000000..501d703e2 --- /dev/null +++ b/v1.0/v1.0/count-lines10-wf.cwl @@ -0,0 +1,37 @@ +#!/usr/bin/env cwl-runner +class: Workflow +cwlVersion: v1.0 + +inputs: + file1: File + +outputs: + count_output: + type: int + outputSource: step1/count_output + +requirements: + - class: SubworkflowFeatureRequirement + +steps: + step1: + in: + file1: file1 + out: [count_output] + run: + class: Workflow + inputs: + file1: File + outputs: + count_output: + type: int + outputSource: step2/output + steps: + step1: + run: wc-tool.cwl + in: {file1: file1} + out: [output] + step2: + run: parseInt-tool.cwl + in: {file1: step1/output} + out: [output] From 1582677e292603008427912a5792cf28387d5bfb Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Thu, 8 Sep 2016 15:14:02 -0400 Subject: [PATCH 2/2] Tighten up formatting --- v1.0/v1.0/count-lines10-wf.cwl | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/v1.0/v1.0/count-lines10-wf.cwl b/v1.0/v1.0/count-lines10-wf.cwl index 501d703e2..63d9f0ff1 100755 --- a/v1.0/v1.0/count-lines10-wf.cwl +++ b/v1.0/v1.0/count-lines10-wf.cwl @@ -1,37 +1,22 @@ #!/usr/bin/env cwl-runner class: Workflow cwlVersion: v1.0 - inputs: - file1: File - + file1: File outputs: - count_output: - type: int - outputSource: step1/count_output - + count_output: {type: int, outputSource: step1/count_output} requirements: - - class: SubworkflowFeatureRequirement - + SubworkflowFeatureRequirement: {} steps: step1: - in: - file1: file1 + in: {file1: file1} out: [count_output] run: class: Workflow inputs: file1: File outputs: - count_output: - type: int - outputSource: step2/output + count_output: {type: int, outputSource: step2/output} steps: - step1: - run: wc-tool.cwl - in: {file1: file1} - out: [output] - step2: - run: parseInt-tool.cwl - in: {file1: step1/output} - out: [output] + step1: {run: wc-tool.cwl, in: {file1: file1}, out: [output]} + step2: {run: parseInt-tool.cwl, in: {file1: step1/output}, out: [output]}