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
Cleanup documentation in preparation for sphinx-doc/sphinx#10807 #24050
Conversation
This upstream Sphinx PR will make each function, class, and method docstring appear in the table of contents (i.e., in the right sidebar). This means that headers like sympify ^^^^^^^ .. autofunction:: sympify are now redundant. This can be merged before the upstream Sphinx PR is merged, however, until a Sphinx release is made with it, those pages will not have headers for the functions. However, the use of the above one-header-per-function style was done very inconsistently throughout the reference pages. This PR also - Changes all index.rst pages to use :titlesonly: instead of :maxdepth:. This makes the table of contents pages only show the table of contents for actual pages. With each function included in the ToC, showing them all on the index page made the table of contents quite large in many cases. These index pages are still mostly useless, especially given the left sidebar. I leave it to a future PR to either do something better with them or remove them entirely. This is related to sympy#23333. - I have split the mechancs, vector, and physics vector API toc into separate index pages. This does not affect the URLs of the pages themselves (the API pages were already in separate api/ subdirectories), but it does make the left sidebar put these API pages under a separate foldable API heading. - A few very minor cleanups. I have left most things intact they way they were, even in instances where things could clearly be improved. Fixes sympy#23332.
✅ Hi, I am the SymPy bot (v167). I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.12. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
🟠Hi, I am the SymPy bot (v167). I've noticed that some of your commits add or delete files. Since this is sometimes done unintentionally, I wanted to alert you about it. This is an experimental feature of SymPy Bot. If you have any feedback on it, please comment at sympy/sympy-bot#75. The following commits add new files:
If these files were added/deleted on purpose, you can ignore this message. |
To see what this will look like, you'll need to build the docs against sphinx-doc/sphinx#10807. Here is an example of will look like. Note the headers in the right sidebar. BeforeAfter |
Benchmark results from GitHub Actions Lower numbers are good, higher numbers are bad. A ratio less than 1 Significantly changed benchmark results (PR vs master) Significantly changed benchmark results (master vs previous release) before after ratio
[41d90958] [870bd54a]
<sympy-1.11.1^0>
- 1.18±0ms 756±3μs 0.64 solve.TimeSparseSystem.time_linear_eq_to_matrix(10)
- 3.43±0.03ms 1.40±0ms 0.41 solve.TimeSparseSystem.time_linear_eq_to_matrix(20)
- 6.84±0.02ms 2.05±0.01ms 0.30 solve.TimeSparseSystem.time_linear_eq_to_matrix(30)
Full benchmark results can be found as artifacts in GitHub Actions |
A version of Sphinx with this enabled will be released very soon: sphinx-doc/sphinx#10807 (comment)
|
Sphinx 5.2.0 has been released with this change. Compare the right sidebar on https://docs.sympy.org/dev/modules/ntheory.html with this PR. Any objections to merging this? |
The dev docs are already being built with 5.2.0, which is leading to duplicate headers (see e.g., the sidebar at https://docs.sympy.org/dev/modules/core.html#eq). |
Another merge conflict. I think I'm just going to self-merge this. If someone wants to review feel free to cancel it. |
This upstream Sphinx PR will make each function, class, and method docstring appear in the table of contents (i.e., in the right sidebar). This means that headers like
are now redundant.
This can be merged before the upstream Sphinx PR is merged, however, until a Sphinx release is made with it, those pages will not have headers for the functions. However, the use of the above one-header-per-function style was done very inconsistently throughout the reference pages.
This PR also
Changes all index.rst pages to use :titlesonly: instead of :maxdepth:. This makes the table of contents pages only show the table of contents for actual pages. With each function included in the ToC, showing them all on the index page made the table of contents quite large in many cases.
These index pages are still mostly useless, especially given the left sidebar. I leave it to a future PR to either do something better with them or remove them entirely. This is related to Clean up some of the layout in the docs #23333.
I have split the mechancs, vector, and physics vector API toc into separate index pages. This does not affect the URLs of the pages themselves (the API pages were already in separate api/ subdirectories), but it does make the left sidebar put these API pages under a separate foldable API heading.
A few very minor cleanups. I have left most things intact they way they were, even in instances where things could clearly be improved.
References to other Issues or PRs
Fixes #23332.
Brief description of what is fixed or changed
Other comments
It's hard to keep this many changes up with merge conflicts, so I would like for this to be merged sooner rather than later.
Release Notes