Skip to content

Commit b5e4788

Browse files
authored
Merge pull request #49 from common-workflow-language/inputBinding.position_expr
add changelog & test for expression in inputBinding.position
2 parents 4ebf411 + 8de195f commit b5e4788

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

CommandLineTool.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ $graph:
100100
* [Added](#LoadListingRequirement) `LoadListingRequirement`
101101
and [loadListing](#LoadContents) to control whether and how
102102
`Directory` listings should be loaded for use in expressions.
103+
* The position field of the [CommandLineBinding](#CommandLineBinding) can
104+
now be calculated from a CWL Expression.
103105
104106
See also the [CWL Workflow Description, v1.1.0-dev1 changelog](Workflow.html#Changelog).
105107

conformance_tests.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3184,3 +3184,11 @@
31843184
subdirectory objects when input parameter loadListing is
31853185
'deep_listing'
31863186
tags: [ command_line_tool ]
3187+
3188+
- job: tests/echo-position-expr-job.yml
3189+
tool: tests/echo-position-expr.cwl
3190+
label: inputBinding_position_expr
3191+
output:
3192+
out: "🕺 1 singular sensation!\n"
3193+
doc: TBD
3194+
tags: [ command_line_tool, required ]

tests/echo-position-expr-job.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
one: 1
2+
two: 2

tests/echo-position-expr.cwl

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env cwl-runner
2+
3+
class: CommandLineTool
4+
cwlVersion: v1.1.0-dev1
5+
requirements:
6+
InlineJavascriptRequirement: {}
7+
inputs:
8+
one:
9+
type: int
10+
inputBinding:
11+
position: $(self)
12+
two:
13+
type: int
14+
inputBinding:
15+
valueFrom: sensation!
16+
position: ${return self+1;}
17+
arguments:
18+
- position: ${return 2;}
19+
valueFrom: singular
20+
- position: ${return null;}
21+
valueFrom: 🕺
22+
outputs:
23+
out:
24+
type: string
25+
outputBinding:
26+
glob: out.txt
27+
loadContents: true
28+
outputEval: $(self[0].contents)
29+
baseCommand: echo
30+
stdout: out.txt

0 commit comments

Comments
 (0)