-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
gh-130160: use .. program::
directive for documenting venv
CLI
#130699
base: main
Are you sure you want to change the base?
Conversation
.. program::
directive for documenting venv
CLI.. program::
directive for documenting venv
CLI
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 can't see what the .. program::
directive does in the documentation preview. It would be good to see screenshot(s) to show rendering of this section before/after your changes.
@vsajip these are the changes ( with screenshot attached ) Before: ![]() After: ![]() |
So we've duplicated the options information in the bit below "The command, if run with -h, will show the available options:" , in a slightly different formatting? What has that really achieved? And what did the |
@vsajip You're absolutely right that the options information is now duplicated in two slightly different formats:
Now for the second question
The That said, I totally get your point about duplication. If you feel the duplication is unnecessary, we could remove the raw About the It tells Sphinx that the following options ( ref. https://www.sphinx-doc.org/en/master/usage/domains/standard.html#directive-program
My motivation for making this change comes from a few observations in the issue #130160 :
That said, I completely understand your perspective. If the previous presentation wasn’t broken, why fix it? My goal wasn’t to tinker for the sake of tinkering but to subtly improve the docs in a way that aligns with broader Python documentation practices. If you’re not convinced that these changes add enough value, I’m happy to roll them back or refine them further. Please Let me know what you think! |
Well, that's not good, in my view. I have no particular opinion on the
Well, I didn't see any in But the duplication has to go, IMO. Note that if you remove the I see #130160 is trying to do this across various modules in the stdlib, so fair enough, I suppose ... my main concern is the extra work for maintainers (for this module, that's often me!) when the CLI changes. |
Yeah, we did not want to close it until we update the targeted docs, I'll update it, thanks @vsajip |
Thanks for your suggesstions, @vsajip .
Just my two cents, it will need a little bit of extra work while adding new features but it will make the docs overall better. tagging @picnixz for his views, as he is helping me a lot in this issue and he originally created the issue. TiA.
|
There are benefits for having the
If you however think that it's not worth the change, we can skip that one. I can understand that it's easier to C/C if you already have an ArgumentParser outputting you the options. But for some modules, the option description may use backreferences. |
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.
tagging @vsajip for their opinion on this discussion and their opinion on this PR.
Issue: #130160
.. program::
and.. option::
directives for modules with a documented CLI #130160📚 Documentation preview 📚: https://cpython-previews--130699.org.readthedocs.build/