Skip to content

Commit 467faab

Browse files
committed
Squashed 'cwltool/schemas/' changes from 7a9bee2..e7e2c38
e7e2c38 put stdin type in correct place 0c148fe add jsonldPredicate to disambiguate stdin 9d1b74b stdin shortcut 1c05584 Merge pull request #299 from common-workflow-language/v1.1.0-dev1 git-subtree-dir: cwltool/schemas git-subtree-split: e7e2c38687a17ffa853658cd2a994f1870cc7ecf
1 parent bf779f7 commit 467faab

File tree

7 files changed

+97
-38
lines changed

7 files changed

+97
-38
lines changed

doc/add-new-draft.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ How to make a new draft version of the CWL spec
1111

1212
4. In the reference implementation (cwltool): make a new branch, and update the
1313
subtree checkout of the spec:
14-
15-
git subtree merge -P cwltool/schemas/ cwl_repo/v1.1.0-dev1
14+
15+
git subtree merge --squash -P cwltool/schemas/ cwl_repo/v1.1.0-dev1
1616

1717
Where `cwl_repo` is the remote repository for the CWL specifications.
1818
4. In the reference implementation, teach it about the new draft version:

run_test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ JUNIT_XML=""
1717
RUNNER=cwl-runner
1818
PLATFORM=$(uname -s)
1919
COVERAGE="python"
20+
EXTRA=""
2021

2122
while [[ -n "$1" ]]
2223
do
@@ -70,7 +71,7 @@ runtest() {
7071
(cd $DRAFT
7172
cwltest --tool "$1" \
7273
--test=conformance_test_${DRAFT}.yaml ${TEST_N} \
73-
${TEST_L} ${ONLY_TOOLS} ${JUNIT_XML} --basedir ${DRAFT}
74+
${TEST_L} ${ONLY_TOOLS} ${JUNIT_XML} --basedir ${DRAFT} -- ${EXTRA}
7475
)
7576
checkexit
7677
}

v1.1.0-dev1/CommandLineTool.yml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $graph:
4242
maintenance release of the CWL CommandLineTool specification.
4343
Version 1.1 introduces the followings additions:
4444
45-
*
45+
* Addition of `stdin` type shortcut for `CommandInputParamater`s.
4646
4747
## Introduction to v1.0
4848
@@ -375,6 +375,30 @@ $graph:
375375
specializeTo: CommandInputArraySchema
376376
- specializeFrom: InputBinding
377377
specializeTo: CommandLineBinding
378+
fields:
379+
- name: type
380+
type:
381+
- "null"
382+
- CWLType
383+
- stdin
384+
- InputRecordSchema
385+
- InputEnumSchema
386+
- InputArraySchema
387+
- string
388+
- type: array
389+
items:
390+
- CWLType
391+
- InputRecordSchema
392+
- InputEnumSchema
393+
- InputArraySchema
394+
- string
395+
jsonldPredicate:
396+
"_id": "sld:type"
397+
"_type": "@vocab"
398+
refScope: 2
399+
typeDSL: True
400+
doc: |
401+
Specify valid types of data that may be assigned to this parameter.
378402
379403
- type: record
380404
name: CommandOutputParameter
@@ -409,6 +433,31 @@ $graph:
409433
doc: |
410434
Specify valid types of data that may be assigned to this parameter.
411435
436+
- name: stdin
437+
type: enum
438+
symbols: [ "cwl:stdin" ]
439+
docParent: "#CommandInputParameter"
440+
doc: |
441+
Only valid as a `type` for a `CommandLineTool` input with no
442+
`inputBinding` set. `stdin` must not be specified at the `CommandLineTool`
443+
level.
444+
445+
The following
446+
```
447+
inputs:
448+
an_input_name:
449+
type: stdin
450+
```
451+
is equivalent to
452+
```
453+
inputs:
454+
an_input_name:
455+
type: File
456+
streamable: true
457+
458+
stdin: ${inputs.an_input_name.path}
459+
```
460+
412461
- name: stdout
413462
type: enum
414463
symbols: [ "cwl:stdout" ]
@@ -558,6 +607,7 @@ $graph:
558607
"_container": "@list"
559608
- name: stdin
560609
type: ["null", string, Expression]
610+
jsonldPredicate: "https://w3id.org/cwl/cwl#stdin"
561611
doc: |
562612
A path to a file whose contents must be piped into the command's
563613
standard input stream.

v1.1.0-dev1/Process.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -568,28 +568,6 @@ $graph:
568568
The default value for this parameter if not provided in the input
569569
object.
570570
571-
- name: type
572-
type:
573-
- "null"
574-
- CWLType
575-
- InputRecordSchema
576-
- InputEnumSchema
577-
- InputArraySchema
578-
- string
579-
- type: array
580-
items:
581-
- CWLType
582-
- InputRecordSchema
583-
- InputEnumSchema
584-
- InputArraySchema
585-
- string
586-
jsonldPredicate:
587-
"_id": "sld:type"
588-
"_type": "@vocab"
589-
refScope: 2
590-
typeDSL: True
591-
doc: |
592-
Specify valid types of data that may be assigned to this parameter.
593571
594572
- name: OutputParameter
595573
type: record

v1.1.0-dev1/Workflow.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,39 @@ $graph:
107107
doc: |
108108
Specify valid types of data that may be assigned to this parameter.
109109
110+
- name: RegularInputParameter
111+
type: record
112+
extends: InputParameter
113+
fields:
114+
- name: type
115+
type:
116+
- "null"
117+
- CWLType
118+
- InputRecordSchema
119+
- InputEnumSchema
120+
- InputArraySchema
121+
- string
122+
- type: array
123+
items:
124+
- CWLType
125+
- InputRecordSchema
126+
- InputEnumSchema
127+
- InputArraySchema
128+
- string
129+
jsonldPredicate:
130+
"_id": "sld:type"
131+
"_type": "@vocab"
132+
refScope: 2
133+
typeDSL: True
134+
doc: |
135+
Specify valid types of data that may be assigned to this parameter.
136+
110137
- type: record
111138
name: ExpressionTool
112139
extends: Process
113140
specialize:
141+
- specializeFrom: "#InputParameter"
142+
specializeTo: "#RegularInputParameter"
114143
- specializeFrom: "#OutputParameter"
115144
specializeTo: "#ExpressionToolOutputParameter"
116145
documentRoot: true
@@ -462,6 +491,8 @@ $graph:
462491
extends: "#Process"
463492
documentRoot: true
464493
specialize:
494+
- specializeFrom: "#InputParameter"
495+
specializeTo: "#RegularInputParameter"
465496
- specializeFrom: "#OutputParameter"
466497
specializeTo: "#WorkflowOutputParameter"
467498
doc: |

v1.1.0-dev1/conformance_test_v1.1.0-dev1.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,17 @@
117117
tool: v1.1.0-dev1/cat4-tool.cwl
118118
doc: Test command execution in Docker with stdin and stdout redirection
119119

120+
- job: v1.1.0-dev1/cat-job.json
121+
output:
122+
output_txt:
123+
class: File
124+
checksum: sha1$47a013e660d408619d894b20806b1d5086aab03b
125+
location: output.txt
126+
size: 13
127+
tool: v1.1.0-dev1/cat4b-tool.cwl
128+
doc: Test command execution in Docker with stdin and stdout redirection
129+
with stdin shortcut
130+
120131
- job: v1.1.0-dev1/empty.json
121132
tool: v1.1.0-dev1/null-expression1-tool.cwl
122133
output:

v1.1.0-dev1/v1.1.0-dev1/cat2-tool.cwl

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)