From 982ed4a253d431ea45feb048f46b0ff69e158606 Mon Sep 17 00:00:00 2001 From: VasuJ <145879890+vjaganat90@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:32:22 -0400 Subject: [PATCH] (Modified) Add flag to only compile workflow to cwl without running (#274) Co-authored-by: JesseMckinzie --- src/sophios/cli.py | 2 ++ src/sophios/main.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/sophios/cli.py b/src/sophios/cli.py index bca6c548..c892d589 100644 --- a/src/sophios/cli.py +++ b/src/sophios/cli.py @@ -83,6 +83,8 @@ help='Just generates run.sh and exits. Does not actually invoke ./run.sh') group_run.add_argument('--run_local', default=False, action="store_true", help='After generating the cwl file(s), run it on your local machine.') +group_run.add_argument('--generate_cwl_workflow', required=False, default=False, action="store_true", + help='Compile the workflow without pulling the docker image') parser.add_argument('--cwl_inline_subworkflows', default=False, action="store_true", help='Before generating the cwl file, inline all subworkflows.') diff --git a/src/sophios/main.py b/src/sophios/main.py index 3c1d4b08..e7ba57a0 100644 --- a/src/sophios/main.py +++ b/src/sophios/main.py @@ -194,6 +194,9 @@ def main() -> None: print("(This may happen if you installed the graphviz python package") print("but not the graphviz system package.)") + if args.generate_cwl_workflow: + io.write_to_disk(rose_tree, Path('autogenerated/'), True, args.inputs_file) + if args.run_local or args.generate_run_script: # cwl-docker-extract recursively `docker pull`s all images in all subworkflows. # This is important because cwltool only uses `docker run` when executing