-
-
Notifications
You must be signed in to change notification settings - Fork 784
✨ Add support for rich_help_panel
of commands in generated docs
#828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
✨ Add support for rich_help_panel
of commands in generated docs
#828
Conversation
I added the tests to verify the cases with default ( |
As clarified at #830, |
Tricky merge conflict with #944, which has changed the order of commands being displayed. Should be all good and green again. |
@svlandeg, many thanks for checking this out and fixing the merge conflicts! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a nice feature! I tested it with
typer docs_src/commands/help/tutorial006.py utils docs
to see the difference between master
and this PR, and you nicely get the subdivision in the markdown with this PR:
whereas on master
it's just:

There's a few issues with the code though. I'll comment inline, and will put the PR in draft as I push some changes.
rich_help_panel
of commands in generated docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ready for review by Tiangolo.
One final remark I have here is that this code is not tested in our test suite without having rich
installed. This is why the initial implementation didn't result in a test failure, while it really should have. #1297 should improve that situation (that said, I think these PRs can be reviewed/merged independently).
The generated Markdown docs ignore the division given by
rich_help_panel
while listing the commands. This is a proposal to support it.