-
Notifications
You must be signed in to change notification settings - Fork 448
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
fix(docs): display examples correctly in RTD #5139
Conversation
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5139 +/- ##
==========================================
- Coverage 94.88% 89.71% -5.17%
==========================================
Files 658 342 -316
Lines 55189 22640 -32549
==========================================
- Hits 52364 20311 -32053
+ Misses 2825 2329 -496 ☔ View full report in Codecov by Sentry. |
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.
Thanks!
As a future enhancement, we should look into doing this programmatically in craft-cli when rendering for plaintext or rst.
@medubelko - I added you to this because during planning today, we discussed if usage examples and output examples belong in the command's overview. We didn't reach a consensus and want to get your opinion. |
Wouldn't this require another parser, or at least another step in the doc stack?
I would prefer if we generally stuck to the manpage convention:
Where things get fuzzy is whether the description should contain multiple or detailed examples. I'm fine with a few, but if we start writing paragraphs where we're advising on usage (rather than agnostically describing the command) it sounds like what we really need is a how-to for the command. The LXD docs provide good examples of command how-tos. It's also best if we don't foray too far into the weeds about the nuances of individual arguments within the description. That's what the Required and Options argument sections should be for. That said, are there cases where we want to provide all these examples in the description because the standard or global arguments are appreciably different for certain commands? If so, then we have a deeper problem related to transclusion. |
@medubelko thanks, following the manpage precedent makes sense to me. And I agree that some help messages are filling in the place of missing how-tos. Not a problem I'd like to tackle today 🙈
I think we would enhance
Nothing comes to mind for snapcraft except for |
Approved. @mr-cal I left a more detailed comment about the source-parser discussion in the other PR. |
tox run -m lint
?tox run -e test-py310
? (supported versions:py39
,py310
,py311
,py312
)Some of the commands auto-generated docs were not rendered correctly, this PR addresses that
Before:
After: