8000 Add dictionary binding for hints · phenoflow/python-cwlgen@2862501 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2862501

Browse files
committed
Add dictionary binding for hints
1 parent 13eb4f3 commit 2862501

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cwlgen/commandlinetool.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ def __init__(
201201
self.cwlVersion = cwl_version
202202
self.id = tool_id
203203
self.label = label
204-
self.requirements = [] # List of Several object inhereting from [Requirement]
205-
self.hints = []
204+
self.requirements = [] # List of objects inheriting from [Requirement]
205+
self.hints = [] # List of objects inheriting from [Requirement]
206206
self.inputs = [] # List of [CommandInputParameter] objects
207207
self.outputs = [] # List of [CommandOutputParameter] objects
208208
self.baseCommand = base_command
@@ -235,6 +235,9 @@ def get_dict(self):
235235

236236
if self.requirements:
237237
d["requirements"] = {r.get_class(): r.get_dict() for r in self.requirements}
238+
if self.hints:
239+
d["hints"] = {r.get_class(): r.get_dict() for r in self.hints}
240+
238241
return d
239242

240243
@classmethod

cwlgen/workflow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def get_dict(self):
7878

7979
if self.requirements:
8080
cwl_workflow['requirements'] = {r.get_class(): r.get_dict() for r in self.requirements}
81+
if self.hints:
82+
cwl_workflow["hints"] = {r.get_class(): r.get_dict() for r in self.hints}
8183

8284
return cwl_workflow
8385

0 commit comments

Comments
 (0)
0