Skip to content

Commit 74cab1c

Browse files
committed
Merge branch 'dot_files' into wfcommons_test
2 parents 2616a09 + 38a7057 commit 74cab1c

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

wfcommons/common/workflow.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,11 @@ def write_json(self, json_file_path: Optional[pathlib.Path] = None) -> None:
172172
specification_tasks.append(task_spec)
173173

174174
# add machines to the workflow json object
175-
for machine in task.machines:
176-
if machine.name not in machines_list:
177-
machines_list.append(machine.name)
178-
workflow_machines.append(machine.as_dict())
175+
if task.machines:
176+
for machine in task.machines:
177+
if machine.name not in machines_list:
178+
machines_list.append(machine.name)
179+
workflow_machines.append(machine.as_dict())
179180

180181
# add files to the workflow json object (input and output)
181182
for file in task.input_files:
@@ -228,7 +229,7 @@ def read_dot(self, dot_file_path: Optional[pathlib.Path] = None) -> None:
228229
tasks_map = {}
229230
for node in graph.nodes(data=True):
230231
task_id = f"{node[1]['label']}_ID{node[0]}"
231-
task = Task(name=task_id, id=task_id, runtime=0, task_id=node[0])
232+
task = Task(name=node[1]['label'], task_id=task_id, runtime=0)
232233
self.add_task(task)
233234
tasks_map[node[0]] = task_id
234235

wfcommons/wfgen/abstract_recipe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def _generate_task_files(self, task: Task) -> List[File]:
203203

204204
# generate output files
205205
output_files_list = self._generate_files(task.task_id, task_recipe['output'], FileLink.OUTPUT)
206-
task.output_files = self.tasks_files[task.task_id]
206+
task.output_files = output_files_list
207207

208208
# obtain input files from parents
209209
input_files = []

0 commit comments

Comments
 (0)