click-contrib / sphinx-click

A Sphinx plugin to automatically document click-based applications
MIT License
212 stars 57 forks source link

add ClickSubcommandTableDirective #28

Closed golobor closed 4 years ago

golobor commented 6 years ago

Hi @stephenfin !

Thank you for developing sphinx-click, it proved to be extremely useful! One bit of functionality that seems to be missing from sphinx-click is the ability to create summary tables of all subcommands of a click group (e.g., a manually generated example).

In this pull request, I propose a simple directive that generates a table of all subcommands together with their .short_help. You can find an example of a table generated with this directive here.

Please, let me know if you think that this Directive fits into sphinx-click. I would be very happy to implement any requested changes and fixes.

Thank you!

codecov-io commented 6 years ago

Codecov Report

Merging #28 into master will decrease coverage by 18.86%. The diff coverage is 9.52%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #28       +/-   ##
===========================================
- Coverage   72.22%   53.35%   -18.87%     
===========================================
  Files           1        1               
  Lines         198      283       +85     
  Branches       51       67       +16     
===========================================
+ Hits          143      151        +8     
- Misses         47      124       +77     
  Partials        8        8
Impacted Files Coverage Δ
sphinx_click/ext.py 53.35% <9.52%> (-18.87%) :arrow_down:

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 b4beacc...2fabc1e. Read the comment docs.

golobor commented 5 years ago

bump :)

stephenfin commented 5 years ago

Really sorry about the delay :see_no_evil: This is a great start. In addition to the few comments I've included, I'd also like to see this new directive documented somewhere. Once that's done, I think we're golden