Closed chaselgrove closed 4 years ago
Merging #534 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #534 +/- ##
=======================================
Coverage 89.75% 89.75%
=======================================
Files 148 148
Lines 12483 12483
=======================================
Hits 11204 11204
Misses 1279 1279
Impacted Files | Coverage Δ | |
---|---|---|
reproman/interface/create.py | 94.11% <ø> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update d0b4361...50eb35e. Read the comment docs.
Note that
--
could be used to separate options from positional args, e.g.
$> reproman create -t ssh -b host=localhost port=22 -- newlocalhost
2020-07-02 18:07:17,928 [INFO ] Created the environment newlocalhost
so alternatively we could have just fixed up documentation for create
to make it more obvious
reproman create NAME -b ...
) to mitigate this:
$> reproman create newlocalhost2 -t ssh -b host=localhost port=22
2020-07-02 18:09:07,508 [INFO ] Created the environment newlocalhost2
but
$> git grep -B10 'nargs=.[\+\*]' | grep -e 'Parameter' -e args
reproman/interface/backend_parameters.py-class BackendParameters(Interface):
reproman/interface/backend_parameters.py- backends=Parameter(
reproman/interface/backend_parameters.py- args=("backends",),
reproman/interface/backend_parameters.py: nargs="*")
reproman/interface/create.py- # specs=Parameter(
reproman/interface/create.py- # args=("-s", "--spec",),
reproman/interface/create.py: # # nargs="+",
reproman/interface/create.py- resource_type=Parameter(
reproman/interface/create.py- args=("-t", "--resource-type"),
reproman/interface/create.py- # only_env=Parameter(
reproman/interface/create.py- # args=("--only-env",),
reproman/interface/create.py: # nargs="+",
reproman/interface/create.py- # existing=Parameter(
reproman/interface/create.py- # args=("-e", "--existing"),
reproman/interface/create.py- backend_parameters=Parameter(
reproman/interface/create.py- args=("-b", "--backend-parameters"),
reproman/interface/create.py: nargs="+",
reproman/interface/execute.py- command=Parameter(
reproman/interface/execute.py- args=Parameter(
reproman/interface/execute.py- doc="list of positional and keyword args to pass to the command",
reproman/interface/execute.py: nargs="*",
reproman/interface/install.py- spec=Parameter(
reproman/interface/install.py- args=("spec",),
reproman/interface/install.py: nargs="+",
reproman/interface/jobs.py- queries=Parameter(
reproman/interface/jobs.py: nargs="*",
reproman/interface/ls.py- refresh=Parameter(
reproman/interface/ls.py- args=("-r", "--refresh",),
reproman/interface/ls.py- resrefs=Parameter(
reproman/interface/ls.py- args=("resrefs",),
reproman/interface/ls.py: nargs="*",
reproman/interface/retrace.py- spec=Parameter(
reproman/interface/retrace.py- args=("--spec",),
reproman/interface/retrace.py: # nargs="+",
reproman/interface/retrace.py- path=Parameter(
reproman/interface/retrace.py- args=("path",),
reproman/interface/retrace.py: nargs="*",
so sounds like it is a single point of such cmdline UI pattern.
So it would make cmdline UI more consistent. Thus Merging, thanks!
This makes more sense to me, especially with the environment name being a naked command line argument (without a flag) -- which arguably belongs at the end of the command line -- but this isn't possible if -b slurps up everything following it.