Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store submit command args in designated workflow directory. #778

Merged
merged 8 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Contributors:
* Paul Bryant - `paulbry <https://github.com/paulbry>`_
* Rusty Davis - `rstyd <https://github.com/rstyd>`_
* Jieyang Chen - `JieyangChen7 <https://github.com/JieyangChen7>`_
* Krishna Chilleri - `Krishna Chilleri <https://github.com/kchilleri>`_
* Patricia Grubel - `pagrubel <https://github.com/pagrubel>`_
* Qiang Guan - `guanxyz <https://github.com/guanxyz>`_
* Ragini Gupta - `raginigupta6 <https://github.com/raginigupta6>`_
Expand Down
14 changes: 14 additions & 0 deletions beeflow/client/bee_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -281,6 +282,19 @@ 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_name = open(sub_wf_dir, "w", encoding="utf-8")
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


Expand Down
Loading