Skip to content

Commit 36cf29d

Browse files
committed
ArraySchema.items does need typeDSL after all
1 parent 8f9a9ef commit 36cf29d

File tree

5 files changed

+59
-0
lines changed

5 files changed

+59
-0
lines changed

tests/test_examples.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,3 +1587,15 @@ def test_custom_type_in_step_process() -> None:
15871587
]
15881588
)
15891589
assert err_code == 0
1590+
1591+
1592+
@pytest.mark.parametrize("version", ["1_0", "1_1", "1_2"])
1593+
def test_array_items_typedsl(version: str) -> None:
1594+
"""Demonstrate that 'type: array, items: SomeType[]' works."""
1595+
err_code, _, stderr = get_main_output(
1596+
[
1597+
get_data(f"tests/wf/nested_typedsl_v{version}.cwl"),
1598+
get_data("tests/wf/nested_typedsl_job.yml"),
1599+
]
1600+
)
1601+
assert err_code == 0

tests/wf/nested_typedsl_job.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cat_in:
2+
- - class: File
3+
location: echo.cwl
4+
- class: File
5+
location: cat.cwl

tests/wf/nested_typedsl_v1_0.cwl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env cwl-runner
2+
cwlVersion: v1.0
3+
class: CommandLineTool
4+
baseCommand: cat
5+
inputs:
6+
cat_in:
7+
type:
8+
type: array
9+
items: File[]
10+
inputBinding: {}
11+
stdout: all.txt
12+
outputs:
13+
txt:
14+
type: stdout

tests/wf/nested_typedsl_v1_1.cwl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env cwl-runner
2+
cwlVersion: v1.0
3+
class: CommandLineTool
4+
baseCommand: cat
5+
inputs:
6+
cat_in:
7+
type:
8+
type: array
9+
items: File[]
10+
inputBinding: {}
11+
stdout: all.txt
12+
outputs:
13+
txt:
14+
type: stdout

tests/wf/nested_typedsl_v1_2.cwl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env cwl-runner
2+
cwlVersion: v1.0
3+
class: CommandLineTool
4+
baseCommand: cat
5+
inputs:
6+
cat_in:
7+
type:
8+
type: array
9+
items: File[]
10+
inputBinding: {}
11+
stdout: all.txt
12+
outputs:
13+
txt:
14+
type: stdout

0 commit comments

Comments
 (0)