-
Notifications
You must be signed in to change notification settings - Fork 123
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
Simple ReST renderer for CLI help texts #2574
Conversation
7dd7c94
to
f5b5538
Compare
044dbed
to
2ffecd3
Compare
9e64363
to
5a4ab4e
Compare
2ffecd3
to
e3282e0
Compare
000dd0f
to
fc1b487
Compare
a551f2e
to
a2933ec
Compare
43bcfe5
to
cbbc346
Compare
a2933ec
to
8d2ef47
Compare
cbbc346
to
753b7b8
Compare
8d2ef47
to
1dc5dc9
Compare
753b7b8
to
3b22dfa
Compare
1dc5dc9
to
93eceec
Compare
3b22dfa
to
9c544fd
Compare
/packit test -i full |
93eceec
to
b197b2e
Compare
b9bfe65
to
d364faf
Compare
Plugin documentation lives in plugin docstrings and elp texts of its fields. It is rendered with Sphinx to create nice HTML docs, and using ReST directives improves context, readability and interlinking of those HTML docs. But for CLI, tmt does not have a ready-to-use ReST renderer, which means on CLI, directives recognized by ReST and Sphinx are messy, poorly visible and create unpleasant experience. Patch adds a very trivial ReST renderer which is applied to plugin docstrings and help texts of their fields. Uses colors and formats some basic structures like lists or `code-block`s.
7fbeba0
to
8ca0241
Compare
Fix `Common Keys` heading to be on the same level. Proposing note/warning colors consistent with the web. Plus some minor chanes.
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, looks very nice! Could we perhaps keep colors for the notes and warnings consistent with how they are shown on the web? Proposing in f381882 together with a couple of minor changes.
Two more things I've noticed: Seems that bullet points inside notes have an extra
The |
Added a reply in f381882#r138267199, the rest of changes look good to me. |
Hopefully addressed in 2ee42e1
True, and I would probably leave it for the later PR since the whole plugin docs require a review, and |
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.
lgtm, small suggestion
Co-authored-by: Miroslav Vadkerti <mvadkert@redhat.com>
/packit test -i full |
/packit test -i full |
/packit test -i full |
/packit test -i provision |
Plugin documentation lives in plugin docstrings and help texts of its
fields. It is rendered with Sphinx to create nice HTML docs, and using
ReST directives improves context, readability and interlinking of those
HTML docs. But for CLI, tmt does not have a ready-to-use ReST renderer,
which means on CLI, directives recognized by ReST and Sphinx are messy,
poorly visible and create unpleasant experience.
Patch adds a very trivial ReST renderer which is applied to plugin
docstrings and help texts of their fields. Uses colors and formats some
basic structures like lists or
code-block
s.Pull Request Checklist
Previews
https://tmt--2574.org.readthedocs.build/en/2574/plugins/index.html