-
Notifications
You must be signed in to change notification settings - Fork 366
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 information cut off in crs docs #2183
Conversation
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 agree this looks better to not have the pyproj version information within Cartopy.
@rcomer, you've been doing a lot of documentation review on Matplotlib, do you have any comments on this or know why it isn't showing the CircleCI redirect anymore?
We need to add a token, as was done in Matplotlib matplotlib/matplotlib#25672 I was hoping someone from the Met Office would do that |
See #2185. HTH |
I checked the way matplotlib docs are configured and see that it is cleaner to add autoclass_content = 'both' to the conf.py file rather than :special-members: init in the template. This is now changed. Here is some links representative of the modified docs: |
Nice! I think this is an improvement. Do you want the inherited members of |
Thanks! Initially I liked showing the inherited methods since that library is not as common/familiar as something like matplotlib. However, I agree the version callouts are a little confusing and don't like emphasizing the various inherited from_ methods since those don't even work in cartopy. Am happy to go ahead with not showing the inherited members here, especially with it now linking to pyproj.crs.CRS at the top of the page. |
Looks good to me. Thank you @lgolston! |
Rationale
In the core CRS documentation page (https://scitools.org.uk/cartopy/docs/latest/reference/generated/cartopy.crs.CRS.html#), there is rather limited information shown since a majority of the notes are simply “New in version 2.2.0.” or in a few cases cut off, e.g. “Make a CRS from:”.
Also, in the mpl docs pages a description of the input parameters are missing in the current 0.21.0 version (see e.g. https://scitools.org.uk/cartopy/docs/latest/reference/generated/cartopy.mpl.gridliner.Gridliner.html).
Implementation
This is addressed in this PR by creating a new Sphinx template class_with_inherited.rst and directing autosummary to use it in the reference/crs.rst doc page, causing the full docstring to be shown rather than just the first line. To reduce the size of the generated pages for classes that inherit CRS, they are set to use class_without_inherited, which is already being used by reference/matplotlib.rst. That template was modified to show init, addressing the missing parameter details.
Implications
The information identified in cartopy.crs.CRS and cartopy.mpl docs that was missing is now shown