From f43c3a2eeaf292aee495b4c592eae00a94dac3a4 Mon Sep 17 00:00:00 2001 From: Krishna Chilleri - 389395 Date: Thu, 8 Feb 2024 13:51:26 -0700 Subject: [PATCH 1/7] Store submit command args in designated workflow directory. --- beeflow/client/bee_client.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/beeflow/client/bee_client.py b/beeflow/client/bee_client.py index ac22c5e57..5f65b6b5b 100644 --- a/beeflow/client/bee_client.py +++ b/beeflow/client/bee_client.py @@ -26,6 +26,7 @@ from beeflow.common.parser import CwlParser from beeflow.common.wf_data import generate_workflow_id from beeflow.client import core +from beeflow.wf_manager.resources import wf_utils # Length of a shortened workflow ID short_id_len = 6 #noqa: Not a constant @@ -281,6 +282,20 @@ def is_parent(parent, path): if tarball_path: os.remove(tarball_path) + # Store provided arguments in text file for future reference + wf_dir = wf_utils.get_workflow_dir(wf_id) + sub_wf_dir = wf_dir + "/submit_command_args.txt" + + f = open(sub_wf_dir, "w") + f.write("beeflow submit wf_name wf_path main_cwl yaml workdir\n") + f.write("wf_name: " + str(wf_name) + "\n") + f.write("wf_path: " + str(wf_path) + "\n") + f.write("main_cwl: " + str(main_cwl) + "\n") + f.write("yaml: " + str(yaml) + "\n") + f.write("workdir: " + str(workdir) + "\n") + f.write("wf_id: " + str(wf_id)) + f.close() + return wf_id From 84620be107096c828c4305f67005d5a614d4f794 Mon Sep 17 00:00:00 2001 From: Krishna Chilleri <149612138+kchilleri@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:13:43 -0700 Subject: [PATCH 2/7] Fix pylint error --- beeflow/client/bee_client.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/beeflow/client/bee_client.py b/beeflow/client/bee_client.py index 5f65b6b5b..6f8ab925d 100644 --- a/beeflow/client/bee_client.py +++ b/beeflow/client/bee_client.py @@ -286,15 +286,15 @@ def is_parent(parent, path): wf_dir = wf_utils.get_workflow_dir(wf_id) sub_wf_dir = wf_dir + "/submit_command_args.txt" - f = open(sub_wf_dir, "w") - f.write("beeflow submit wf_name wf_path main_cwl yaml workdir\n") - f.write("wf_name: " + str(wf_name) + "\n") - f.write("wf_path: " + str(wf_path) + "\n") - f.write("main_cwl: " + str(main_cwl) + "\n") - f.write("yaml: " + str(yaml) + "\n") - f.write("workdir: " + str(workdir) + "\n") - f.write("wf_id: " + str(wf_id)) - f.close() + f_name = open(sub_wf_dir, "w") + f_name.write("beeflow submit wf_name wf_path main_cwl yaml workdir\n") + f_name.write("wf_name: " + str(wf_name) + "\n") + f_name.write("wf_path: " + str(wf_path) + "\n") + f_name.write("main_cwl: " + str(main_cwl) + "\n") + f_name.write("yaml: " + str(yaml) + "\n") + f_name.write("workdir: " + str(workdir) + "\n") + f_name.write("wf_id: " + str(wf_id)) + f_name.close() return wf_id From b2ba781b77e7b9866f5dff86e6412cb1ae009ede Mon Sep 17 00:00:00 2001 From: Krishna Chilleri <149612138+kchilleri@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:17:46 -0700 Subject: [PATCH 3/7] Fix pylama error about encoding --- beeflow/client/bee_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beeflow/client/bee_client.py b/beeflow/client/bee_client.py index 6f8ab925d..6130080fb 100644 --- a/beeflow/client/bee_client.py +++ b/beeflow/client/bee_client.py @@ -286,7 +286,7 @@ def is_parent(parent, path): wf_dir = wf_utils.get_workflow_dir(wf_id) sub_wf_dir = wf_dir + "/submit_command_args.txt" - f_name = open(sub_wf_dir, "w") + f_name = open(sub_wf_dir, "w", encoding="utf-8") f_name.write("beeflow submit wf_name wf_path main_cwl yaml workdir\n") f_name.write("wf_name: " + str(wf_name) + "\n") f_name.write("wf_path: " + str(wf_path) + "\n") From 2362dac983b79bcb057af1c792c0f5cb8877a0e1 Mon Sep 17 00:00:00 2001 From: Krishna Chilleri <149612138+kchilleri@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:26:00 -0700 Subject: [PATCH 4/7] update write format style --- beeflow/client/bee_client.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/beeflow/client/bee_client.py b/beeflow/client/bee_client.py index 6130080fb..f61aa9989 100644 --- a/beeflow/client/bee_client.py +++ b/beeflow/client/bee_client.py @@ -287,13 +287,13 @@ def is_parent(parent, path): sub_wf_dir = wf_dir + "/submit_command_args.txt" f_name = open(sub_wf_dir, "w", encoding="utf-8") - f_name.write("beeflow submit wf_name wf_path main_cwl yaml workdir\n") - f_name.write("wf_name: " + str(wf_name) + "\n") - f_name.write("wf_path: " + str(wf_path) + "\n") - f_name.write("main_cwl: " + str(main_cwl) + "\n") - f_name.write("yaml: " + str(yaml) + "\n") - f_name.write("workdir: " + str(workdir) + "\n") - f_name.write("wf_id: " + str(wf_id)) + f_name.write(f"beeflow submit wf_name wf_path main_cwl yaml workdir\n") + f_name.write(f"wf_name: {str(wf_name)}\n") + f_name.write(f"wf_path: {str(wf_path)}\n") + f_name.write(f"main_cwl: {str(main_cwl)}\n") + f_name.write(f"yaml: {str(yaml)}\n") + f_name.write(f"workdir: {str(workdir)}\n") + f_name.write(f"wf_id: {str(wf_id)}") f_name.close() return wf_id From 83d440290b1cac027a48d52ddc31fdb2d7f3d5ba Mon Sep 17 00:00:00 2001 From: Krishna Chilleri <149612138+kchilleri@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:29:54 -0700 Subject: [PATCH 5/7] fix f-string error --- beeflow/client/bee_client.py | 1 - 1 file changed, 1 deletion(-) diff --git a/beeflow/client/bee_client.py b/beeflow/client/bee_client.py index f61aa9989..b7e6b5b33 100644 --- a/beeflow/client/bee_client.py +++ b/beeflow/client/bee_client.py @@ -287,7 +287,6 @@ def is_parent(parent, path): sub_wf_dir = wf_dir + "/submit_command_args.txt" f_name = open(sub_wf_dir, "w", encoding="utf-8") - f_name.write(f"beeflow submit wf_name wf_path main_cwl yaml workdir\n") f_name.write(f"wf_name: {str(wf_name)}\n") f_name.write(f"wf_path: {str(wf_path)}\n") f_name.write(f"main_cwl: {str(main_cwl)}\n") From 59dcf9ffe1f2e97f43633206bbf3383009c43a62 Mon Sep 17 00:00:00 2001 From: Krishna Chilleri <149612138+kchilleri@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:51:19 -0700 Subject: [PATCH 6/7] correcting f-string format style --- beeflow/client/bee_client.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/beeflow/client/bee_client.py b/beeflow/client/bee_client.py index b7e6b5b33..eed47db0a 100644 --- a/beeflow/client/bee_client.py +++ b/beeflow/client/bee_client.py @@ -287,12 +287,12 @@ def is_parent(parent, path): sub_wf_dir = wf_dir + "/submit_command_args.txt" f_name = open(sub_wf_dir, "w", encoding="utf-8") - f_name.write(f"wf_name: {str(wf_name)}\n") - f_name.write(f"wf_path: {str(wf_path)}\n") - f_name.write(f"main_cwl: {str(main_cwl)}\n") - f_name.write(f"yaml: {str(yaml)}\n") - f_name.write(f"workdir: {str(workdir)}\n") - f_name.write(f"wf_id: {str(wf_id)}") + f_name.write(f"wf_name: {wf_name}\n") + f_name.write(f"wf_path: {wf_path}\n") + f_name.write(f"main_cwl: {main_cwl}\n") + f_name.write(f"yaml: {yaml}\n") + f_name.write(f"workdir: {workdir}\n") + f_name.write(f"wf_id: {wf_id}") f_name.close() return wf_id From 1b8f3fd81f5a1323fb9e550c49ccd7af345efa12 Mon Sep 17 00:00:00 2001 From: Patricia Grubel Date: Thu, 15 Feb 2024 15:27:00 -0700 Subject: [PATCH 7/7] Add Krisna to contributors --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index dd1250d0e..d83f2103d 100644 --- a/README.rst +++ b/README.rst @@ -42,6 +42,7 @@ Contributors: * Paul Bryant - `paulbry `_ * Rusty Davis - `rstyd `_ * Jieyang Chen - `JieyangChen7 `_ +* Krishna Chilleri - `Krishna Chilleri `_ * Patricia Grubel - `pagrubel `_ * Qiang Guan - `guanxyz `_ * Ragini Gupta - `raginigupta6 `_