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

Allow specifying output path formats inline in the command pattern #123

Open
samuell opened this issue Apr 8, 2021 · 0 comments
Open

Allow specifying output path formats inline in the command pattern #123

samuell opened this issue Apr 8, 2021 · 0 comments

Comments

@samuell
Copy link
Member

samuell commented Apr 8, 2021

Right now, to define a process with an output path pattern, one has to do this in two steps:

proc := wf.NewProc("proc", "echo hi > {o:hi}")
proc.SetOut("hi", "hi.txt")

This could be shortened if allowing to set the path formatter inline in the command pattern, like so:

proc := wf.NewProc("proc", "echo hi > {o:hi:hi.txt}")

Similarly, if one process takes an input, one can still do a dynamic pattern inline too. So this:

p1 := wf.NewProc("proc", "echo hi > {o:hi}")
p1.SetOut("hi", "hi.txt")

p2 := wf.NewProc("p2", "cat {i:in} | tr h H > {o:out}")
p2.SetOut("out", "{i:in}.out.txt")
p2.In("in").From(p1.Out("hi"))

... would become this:

p1 := wf.NewProc("p1", "echo hi > {o:hi:hi.txt}")

p2 := wf.NewProc("p2", "cat {i:in} | tr h H > {o:out:{i:in}.out.txt"}
p2.In("in").From(p1.Out("hi"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant