Open Querela opened 3 years ago
Yeah, this isn't something we currently support. I'm not sure how easy it would be to fix this since we don't fully evaluate the application.
Ok. That makes sense and it guards against some side effects. Is it possible to manually rename the command in the docs? (Also complicated probably because of any possible depth.)
Unfortunately not, no
Hmm. It's an internal project. And documentation is currently not done automatically. So maybe just manual postprocessing to update the 5-6 occurrences where it is wrong. Or just a notice somewhere. I can't think of any easy solution/fix for now ...
the renamed names are lost in these lines: https://github.com/click-contrib/sphinx-click/blob/aa0d5b7bcda183d20c7b98a9a1c9acf1e003af97/sphinx_click/ext.py#L285-L288
prior to those lines, for a click.Group
, lookup
is a dictionary that maps the new names to the click.Command
objects. those lines return a list that strips away the new names. perhaps the lookup can be maintained, and the commands can be ordered alphabetically using a OrderedDict (or a list of tuples).
this issue is preventing me from using sphinx-click
to document my application.
I'd welcome a pull request to fix this. Please include tests
Hi, I'm using the most current version of Sphinx (3.4.2), Sphinx-Click (latest) and click (7.1.2).
My situation is like this:
main
(modulemodA.cli
in package packageA)modB.cli
in package packageB) I also have a CLI and import the groupmain
frommodA.cli
assubmain
submain
group to themodB.cli
command groups as a subcommand. If I now executepackageB
I will see the subcommandsubmain
as possible choice. In the generated documentation it however will still appear asmain
(name frommodA.cli
I would suppose)Not sure if the example code can reproduce this or if it has to be separate packages (not just modules)...
I will then call the
modB.cli:main()
entry point.Documentation is dead simple: