biocore / pyqi

Tools for developing and testing command line interfaces in Python.
Other
9 stars 13 forks source link

MAINT:Subclass OptionParser to change error method #265

Closed ElDeveloper closed 9 years ago

ElDeveloper commented 9 years ago

Instead of printing the script usage information and an error message, only the error is printed now.

This PR is going to get merged against qcli.

ElDeveloper commented 9 years ago

Should be ready for review/merge.

wasade commented 9 years ago

Was very confused until I saw this was going to the qcli branch of pyqi. No issues

ElDeveloper commented 9 years ago

Hahaha, yeah, git saves the day again. This essentially remove all the script usage information that users get when they get an error that was raised using option_parser.error. Instead users will only get the error message (which makes more sense).

wasade commented 9 years ago

:smoking:

ElDeveloper commented 9 years ago

Let's hold on merging, we are trying to figure out some details.

gregcaporaso commented 9 years ago

We discussed adding an option to have a string included in the help that would say:

If you need help with QIIME, see:
https://github.com/biocore/qiime/wiki/Getting-help

That page can be updated to cover all of the options that users will have for getting help, and the hope is that they'll read that post and reduce the number of steps between when they ask for help and when their issue is addressed.

It would be awesome if we could get http://help.qiime.org to redirect to that page, and include that URL.

ElDeveloper commented 9 years ago

This should be ready for review/merge. I've tested it out with emperor by adding the following line to the place where parse_command_line_parameters is imported:

parse_command_line_parameters = partial(parse_command_line_parameters, error_suffix="\nIf you have problems, let us know by Yoshiki's personal phone number: XXX-XXX-XXXX\n")