casperdcl / argopt

convert docopt to argparse
https://pypi.python.org/pypi/argopt
Other
23 stars 2 forks source link

Gooey compatibility #10

Closed UplinkPhobia closed 4 years ago

UplinkPhobia commented 4 years ago

I found this repository through https://github.com/chriskiehl/Gooey/issues/4 I was wondering, is argopt compatible with gooey in the current state?

Thanks in advance

casperdcl commented 4 years ago

Related to https://github.com/chriskiehl/Gooey/pull/158 but haven't tested recently

UplinkPhobia commented 4 years ago

From what I've tested so far, it seems to mostly work, except for a bug when combining some arguments in the docstring. bug.py <x> and bug.py [--option] work, but bug.py <x> [--option] will crash, with a bug.py: error: unrecognized arguments: <value_of_x>

It seems to be independent from gooey though

casperdcl commented 4 years ago

Just tried (using current devel). python examples/demo_advanced.py --with-gooey seems to work fine.

casperdcl commented 4 years ago

About option ordering, this also works:

python examples/demo_basic.py arg1 --force
UplinkPhobia commented 4 years ago

I wasn't using the devel branch, after switching it seems to be working. I'll try to use it and see if I encouter any issue. Thank you for the help

casperdcl commented 4 years ago

just released a new version (0.6.1) so you don't need to use devel :)

UplinkPhobia commented 4 years ago

Thanks ^^