Skip to content

Commit

Permalink
(Modified) Add flag to only compile workflow to cwl without running (#…
Browse files Browse the repository at this point in the history
…274)

Co-authored-by: JesseMckinzie <jessemckinzie145@gmail.com>
  • Loading branch information
vjaganat90 and JesseMckinzie authored Sep 18, 2024
1 parent 32c9ec3 commit 982ed4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sophios/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down
3 changes: 3 additions & 0 deletions src/sophios/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 982ed4a

Please sign in to comment.