diff --git a/v1.0/conformance_test_v1.0.yaml b/v1.0/conformance_test_v1.0.yaml index 4f36d2221..30198fb94 100644 --- a/v1.0/conformance_test_v1.0.yaml +++ b/v1.0/conformance_test_v1.0.yaml @@ -325,7 +325,7 @@ location: output.txt size: 1111 tool: v1.0/revsort.cwl - doc: Test sample workflows from the specification + doc: Test simple workflow - job: v1.0/cat-job.json output: @@ -1077,3 +1077,13 @@ job: v1.0/cat-job.json tool: v1.0/null-defined.cwl doc: Test that provided parameter is not null in expression + +- job: v1.0/revsort-job.json + output: + output: + class: File + checksum: sha1$b9214658cc453331b62c2282b772a5c063dbd284 + location: output.txt + size: 1111 + tool: v1.0/revsort-packed.cwl#main + doc: Test compound workflow document diff --git a/v1.0/v1.0/revsort-packed.cwl b/v1.0/v1.0/revsort-packed.cwl new file mode 100644 index 000000000..41884bacf --- /dev/null +++ b/v1.0/v1.0/revsort-packed.cwl @@ -0,0 +1,125 @@ +{ + "cwlVersion": "v1.0", + "$graph": [ + { + "class": "Workflow", + "doc": "Reverse the lines in a document, then sort those lines.", + "hints": [ + { + "class": "DockerRequirement", + "dockerPull": "debian:8" + } + ], + "inputs": [ + { + "type": "File", + "doc": "The input file to be processed.", + "id": "#main/input" + }, + { + "type": "boolean", + "default": true, + "doc": "If true, reverse (decending) sort", + "id": "#main/reverse_sort" + } + ], + "outputs": [ + { + "type": "File", + "outputSource": "#main/sorted/output", + "doc": "The output with the lines reversed and sorted.", + "id": "#main/output" + } + ], + "steps": [ + { + "in": [ + { + "source": "#main/input", + "id": "#main/rev/input" + } + ], + "out": [ + "#main/rev/output" + ], + "run": "#revtool.cwl", + "id": "#main/rev" + }, + { + "in": [ + { + "source": "#main/rev/output", + "id": "#main/sorted/input" + }, + { + "source": "#main/reverse_sort", + "id": "#main/sorted/reverse" + } + ], + "out": [ + "#main/sorted/output" + ], + "run": "#sorttool.cwl", + "id": "#main/sorted" + } + ], + "id": "#main" + }, + { + "class": "CommandLineTool", + "doc": "Reverse each line using the `rev` command", + "inputs": [ + { + "type": "File", + "inputBinding": {}, + "id": "#revtool.cwl/input" + } + ], + "outputs": [ + { + "type": "File", + "outputBinding": { + "glob": "output.txt" + }, + "id": "#revtool.cwl/output" + } + ], + "baseCommand": "rev", + "stdout": "output.txt", + "id": "#revtool.cwl" + }, + { + "class": "CommandLineTool", + "doc": "Sort lines using the `sort` command", + "inputs": [ + { + "id": "#sorttool.cwl/reverse", + "type": "boolean", + "inputBinding": { + "position": 1, + "prefix": "--reverse" + } + }, + { + "id": "#sorttool.cwl/input", + "type": "File", + "inputBinding": { + "position": 2 + } + } + ], + "outputs": [ + { + "id": "#sorttool.cwl/output", + "type": "File", + "outputBinding": { + "glob": "output.txt" + } + } + ], + "baseCommand": "sort", + "stdout": "output.txt", + "id": "#sorttool.cwl" + } + ] +} \ No newline at end of file