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

Turning WDL files into executables using shebang #158

Open
prihoda opened this issue Jun 14, 2019 · 2 comments
Open

Turning WDL files into executables using shebang #158

prihoda opened this issue Jun 14, 2019 · 2 comments

Comments

@prihoda
Copy link

prihoda commented Jun 14, 2019

By using a #!/usr/bin/env miniwdl shebang line in our WDL file, we could call simply:

hello.wdl who=Alyssa "who=Ben Bitdiddle" x=41

This gets translated into the following command:

miniwdl hello.wdl who=Alyssa "who=Ben Bitdiddle" x=41

However, miniWDL requires the "cromwell" argument first (miniwdl cromwell hello.wdl). Unfortunately, shebang does not universally support adding another argument, so we cannot do #!/usr/bin/env miniwdl cromwell, we will have to solve it some other way. Personally I think we could create another entrypoint in your setup config, that would create a separate executable (e.g. minicromwell) that would be installed as part of the miniwdl package. The user would use #!/usr/bin/env minicromwell, then the minicromwell executable would only forward all its inputs to miniwdl cromwell.

What do you think? I can create a fork and take a shot at it.

@mlin
Copy link
Collaborator

mlin commented Jun 14, 2019

This is a super neat idea!

| What do you think? I can create a fork and take a shot at it.

Absolutely- I've got a pretty full queue of other development work and community contributions to this project are most welcome. Here are two comments:

  1. miniwdl's own local runner capability will start to come online over the next couple of months, which will have a similar command-line interface under a different subcommand, perhaps miniwdl run. So we should design the new entry point for miniwdl cromwell with an eye to eventually making that available too in some isomorphic way.

  2. I'm also currently hacking on adding tab-completion to miniwdl cromwell using argcomplete, so that the user can get auto-completion both of the available input names and local filesystem paths (for File inputs). I hope we can extend that functionality through this shebang approach too. cc @kislyuk

@prihoda
Copy link
Author

prihoda commented Jun 17, 2019

Working draft: #164

Not sure if tab completion will work through the shebang approach as well, we can check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants