-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Doc: Generate Pathlib table with autosummary #126753
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: main
Are you sure you want to change the base?
Conversation
@Nodd Two comments:
|
I tried to use multiple tables before (by hand) in #125809, but the result was not very good, especially for small tables. Maybe it's just a problem with the theme?
To be honest, the documentation improvement was a way for me to start to contribute to CPython. As far as I can tell, the whole python documentation is already "hard coded", there is no link between the docstrings and the html pages. It allows to have a documentation dedicated to console use with the If the aim is to avoid hard coding functions to document the API, there are specialized tools, for example pydoctor that can interact with sphinx via intersphinx. |
This would be an improvement over what I did even without I agree that finding an automated or semi-automated way to build the tables would be a must. There are multiple challenges involved, I'll have to think more about it. Note for example that both in |
I've basically used
to set a common table width and a fixed first column. One could likely tune the values further if desired. Note: |
This is a test in response to #126342 (comment).
@barneygale This is what it looks like with sphinx.ext.autosummary. The table is effectively included in the page, but not all members are present, there is no formatting and no link in the short descriptions, and I don't think that we can add intermediate titles. Also the Sphinx log shown unrelated errors in the log. Event if the errors were fixed, my conclusion is that the page would be easier to maintain, but at the cost of readability in the documentation.
📚 Documentation preview 📚: https://cpython-previews--126753.org.readthedocs.build/
Edit: Oh well, when there are warnings the preview is not available. Here is what it looks like on my computer: