Closed GhostofGoes closed 6 years ago
Interesting. What version of docopt
was working for you? argopt
should be a superset of docopt 0.6.2
I'm working with docopt 0.6.2
Just tried and tested this and I observe the same behaviour. But it seems all expected behaviour to me.
Works without issues, and gives the following (mostly) correct output:
What's incorrect/unexpected with the output? What would "the correct" output be?
There should be an epilog with the examples and project information that follow the optional arguments section.
This is the text that should be there:
Examples:
adles --list-examples
adles -c examples/tutorial.yaml
adles --verbose --masters --spec examples/experiment.yaml
adles -vds examples/competition.yaml
adles --cleanup-masters --nets -s examples/competition.yaml
adles --print-example competition | adles -v -c -
License: Apache 2.0
Author: Christopher Goes <goesc@acm.org>
Project: https://github.com/GhostofGoes/ADLES
ok fixed in the devel
branch now. Could you try it out (e.g.: pip install -e git+https://github.com/casperdcl/argopt.git@devel#egg=argopt
)?
You'll still just require
Usage:
adles [options]
or at least remove the [-]
at the end of your usages.
Sorry for the delay, had the flu for the past week. I'll give it a try when I get a chance. And yeah, agree on removing the [-]
.
it's merged in the latest release
Just tested against latest release. It works like a charm after removing the [-]
. Thank you!
I've been evaluating argopt, and while it's worked great for most of the scripts, the main entry point has been throwing some errors.
Full docstring:
This will throw the following error:
I tried removing the
[-]
at the end of each option string, changing the usage section to this:This causes get the following error:
The actual string it errors on will vary between "-t, --type", "-n, --no-color", and a few others.
Changing the usage to this:
Works without issues, and gives the following (mostly) correct output:
The code that does argument handling:
If helpful, the project source code is available here: https://github.com/GhostofGoes/ADLES
I've had zero issues with docopt, and it's (as far as I know) valid syntax.
Is this a bug with argopt, or am I simply not using the library properly?