Closed nsheff closed 3 years ago
@stolarczyk what do you think? Just wondering if it makes sense to keep consistent with looper... or if for divvy we value the simplicity more
I like the explicit approach more, but that's just slight preference
follow-up question: why is it:
--compute k1=v1,k2=v2
instead of --compute k1=v1 k2=v2
.
With the latter we could use the nargs="+" type and let argparser do the parsing; with the former we're having to parse it separately, within looper, right? is there a reason to do it that way?
that's right, this is how it's done now. I just followed the way it was implemented. The new way would spare splitting by comma part, that's nice. Not sure if there is any reason to do it this way. I'll try to make it use argparser parsing. We could also set the metavar in the parser instead of putting it to the help:
parser.add_argument("--compute",
metavar="KEY=VALUE",
nargs='+', ...
this is working for me now; try with:
divvy submit -p local -c code=ls
divvy write -p local -c code=ls
Right now any unknown args are just taken by divvy to populate template variables.
Should we instead use the
--compute
idea from looper so that you have to say:--compute key=value,key2=val2
?Pros: explicit what's happening Cons: more verbose