Skip to content

Commit 6580d49

Browse files
committed
Add CWL v1.2 spec to package.
Add test for CWL 1.2 parsing Closes #99
1 parent 29c5326 commit 6580d49

File tree

7 files changed

+5144
-4
lines changed

7 files changed

+5144
-4
lines changed

benten/000.package.data/schema-v1.2.0.json

+5,108
Large diffs are not rendered by default.

benten/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _resolve_path(self, path: P):
7777
return P(self.cfg_path, path)
7878

7979
def _copy_missing_language_files(self):
80-
for src_file in default_config_data_dir.glob("schema*.json"):
80+
for src_file in default_config_data_dir.glob("schema-*.json"):
8181
dst_file = P(self.cfg_path, src_file.name)
8282
if not dst_file.exists():
8383
shutil.copy(str(src_file), str(dst_file))

benten/cwl/specification.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
logger = logging.getLogger(__name__)
1313

1414

15-
latest_published_cwl_version = "v1.2.0-dev3"
15+
latest_published_cwl_version = "v1.2.0"
1616
process_types = ["CommandLineTool", "ExpressionTool", "Workflow"]
1717

1818

benten/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Copyright (c) 2019-2020 Seven Bridges. See LICENSE
22

3-
__version__ = "2020.06.03"
3+
__version__ = "2020.09.15"

tests/cwl/cwl-v1.2/cond-wf-001.cwl

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
class: Workflow
2+
cwlVersion: v1.2
3+
inputs:
4+
val: int
5+
6+
steps:
7+
8+
step1:
9+
in:
10+
in1: val
11+
a_new_var: val
12+
run: foo.cwl
13+
when: $(inputs.a_new_var > 2)
14+
out: [out1]
15+
16+
outputs:
17+
out1:
18+
type: string?
19+
outputSource: step1/out1
20+
21+
requirements:
22+
InlineJavascriptRequirement: {}

tests/cwl/cwl-v1.2/foo.cwl

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class: CommandLineTool
2+
cwlVersion: v1.2
3+
inputs:
4+
in1: int
5+
baseCommand: [echo]
6+
outputs:
7+
out1:
8+
type: string
9+
outputBinding:
10+
outputEval: foo $(inputs.in1)

tests/test_workflow_parsing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_ebi_wf_cmsearch_multimodel():
2121

2222
def test_mass_wf_load():
2323
type_dicts = load_type_dicts()
24-
for wf_dir in ["ebi/workflows", "mgi/subworkflows", "mgi/pipelines"]:
24+
for wf_dir in ["ebi/workflows", "mgi/subworkflows", "mgi/pipelines", "cwl-v1.2"]:
2525
path = current_path / "cwl" / wf_dir
2626
for fname in path.glob("*.cwl"):
2727
_ = load(doc_path=fname, type_dicts=type_dicts)

0 commit comments

Comments
 (0)