twitter-archive / commons

Twitter common libraries for python and the JVM (deprecated)
http://twitter.github.com/commons
Other
2.1k stars 565 forks source link

Add option to sort commands names in python app help #455

Closed dogbunny closed 6 years ago

dogbunny commented 6 years ago

Allow sorting of command names for help in python apps

Problem

When automatically generating help from the list of commands in a python app the commands will appear in an arbitrary order. This can make the output, when there are a numerous commands, confusing.

Solution

Add an option to sort the list of commands when generating the help output. Also add tests and a small fix to the readme.

Result

Developers can easily ensure a sorted list of commands will be printed when users call the app help.

dogbunny commented 6 years ago

seems reasonable enough to me.

dogbunny commented 6 years ago

@jcohen, can I get you to merge this change? I'm not a committer. The test failures are completely unrelated.

FAILURE: Error parsing xml file at /home/travis/build/twitter/commons/.pants.d/test/pytest/junitxml/TEST-886794e0dd1a558248764165d01c9c6465c70df6.xml: Error parsing xml file at /home/travis/build/twitter/commons/.pants.d/test/pytest/junitxml/TEST-886794e0dd1a558248764165d01c9c6465c70df6.xml: not well-formed (invalid token): line 2242, column 7765

jcohen commented 6 years ago

I'm also not a committer :(

Yasumoto commented 6 years ago

@brutkin do you have access to publish new dists?

dogbunny commented 6 years ago

I don't believe I have any access what-so-ever =)

dogbunny commented 6 years ago

Thanks for merging though!