Skip to content

Commit 06d83cf

Browse files
committed
Nextflow with Flowcept
1 parent f6080e7 commit 06d83cf

6 files changed

Lines changed: 12 additions & 10 deletions

File tree

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2021-2024 The WfCommons Team.
4+
# Copyright (c) 2021-2025 The WfCommons Team.
55
#
66
# This program is free software: you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by
88
# the Free Software Foundation, either version 3 of the License, or
99
# (at your option) any later version.
1010

1111
from .airflow import AirflowTranslator
12+
from .bash import BashTranslator
13+
from .cwl import CWLTranslator
1214
from .dask import DaskTranslator
1315
from .nextflow import NextflowTranslator
1416
from .parsl import ParslTranslator
1517
from .pegasus import PegasusTranslator
18+
from .pycompss import PyCompssTranslator
1619
from .swift_t import SwiftTTranslator
1720
from .taskvine import TaskVineTranslator
18-
from .cwl import CWLTranslator
19-
from .bash import BashTranslator
20-
from .pycompss import PyCompssTranslator

wfcommons/wfbench/translator/cwl.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2024 The WfCommons Team.
4+
# Copyright (c) 2024-2025 The WfCommons Team.
55
#
66
# This program is free software: you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by
@@ -21,6 +21,7 @@
2121

2222
this_dir = pathlib.Path(__file__).resolve().parent
2323

24+
2425
class CWLTranslator(Translator):
2526
"""
2627
A WfFormat parser for creating CWL workflow benchmarks.
@@ -222,9 +223,9 @@ def _write_cwl_files(self, output_folder: pathlib.Path) -> None:
222223

223224
clt_folder = cwl_folder.joinpath("clt")
224225
clt_folder.mkdir(exist_ok=True)
225-
shutil.copy(this_dir.joinpath("templates/cwl_templates/wfbench.cwl"), clt_folder)
226-
shutil.copy(this_dir.joinpath("templates/cwl_templates/folder.cwl"), clt_folder)
227-
shutil.copy(this_dir.joinpath("templates/cwl_templates/shell.cwl"), clt_folder)
226+
shutil.copy(this_dir.joinpath("templates/cwl/wfbench.cwl"), clt_folder)
227+
shutil.copy(this_dir.joinpath("templates/cwl/folder.cwl"), clt_folder)
228+
shutil.copy(this_dir.joinpath("templates/cwl/shell.cwl"), clt_folder)
228229

229230
with open(cwl_folder.joinpath("main.cwl"), "w", encoding="utf-8") as f:
230231
f.write("\n".join(self.cwl_script))

wfcommons/wfbench/translator/nextflow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ def translate(self, output_folder: pathlib.Path) -> None:
5353
# Create benchmark files
5454
self._copy_binary_files(output_folder)
5555
self._generate_input_files(output_folder)
56+
5657
if self.workflow.workflow_id:
57-
shutil.copy(this_dir.joinpath("templates/nextflow/flowcept_agent.py"), output_folder.joinpath("bin"))
58+
shutil.copy(this_dir.joinpath("templates/flowcept_agent.py"), output_folder.joinpath("bin"))
5859

5960
# Create a topological order of the tasks
6061
sorted_tasks = self._get_tasks_in_topological_order()

wfcommons/wfbench/translator/swift_t.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def translate(self, output_folder: pathlib.Path) -> None:
105105
self.script += f"string fc = sprintf(flowcept, \"{self.workflow.workflow_id}\", \"{self.workflow.name}\", \"{out_files}\");\n" \
106106
"python_persist(fc);\n"
107107

108-
run_workflow_code = self._merge_codelines("templates/swift_t_templates/workflow.swift", self.script)
108+
run_workflow_code = self._merge_codelines("templates/swift_t/workflow.swift", self.script)
109109

110110
# write benchmark files
111111
output_folder.mkdir(parents=True)

wfcommons/wfbench/translator/templates/nextflow/flowcept_agent.py renamed to wfcommons/wfbench/translator/templates/flowcept_agent.py

File renamed without changes.

wfcommons/wfbench/translator/templates/swift_t_templates/workflow.swift renamed to wfcommons/wfbench/translator/templates/swift_t/workflow.swift

File renamed without changes.

0 commit comments

Comments
 (0)