Skip to content

Commit 9a77ef8

Browse files
committed
Made the Swift/T translator create a README file with instructions
1 parent 90a6a49 commit 9a77ef8

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

wfcommons/wfbench/translator/swift_t.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ def translate(self, output_folder: pathlib.Path) -> None:
116116
self._copy_binary_files(output_folder)
117117
self._generate_input_files(output_folder)
118118

119+
# write README file
120+
self._write_readme_file(output_folder)
121+
119122
def _find_categories_list(self, task_name: str, parent_task: Optional[str] = None) -> None:
120123
""""
121124
Find list of task categories ordered by task dependencies.
@@ -238,3 +241,17 @@ def _add_tasks(self, category: str) -> None:
238241
f"{category}__out[0] = string2int(of_{self.cmd_counter});\n\n"
239242

240243
self.cmd_counter += 1
244+
245+
def _write_readme_file(self, output_folder: pathlib.Path) -> None:
246+
"""
247+
Write the README file.
248+
249+
:param output_folder: The path of the output folder.
250+
:type output_folder: pathlib.Path
251+
"""
252+
readme_file_path = output_folder.joinpath("README")
253+
with open(readme_file_path, "w") as out:
254+
out.write(f"Start a REDIS server: redis-server\n")
255+
out.write(f"[Optional] Check that REDIS works: redis-cli ping (it should say \"PONG\")\n")
256+
out.write(f"Run the workflow: swift-t workflow.swift\n")
257+

0 commit comments

Comments
 (0)