Skip to content
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

Reduce sphinx warnings #2221

Merged
merged 3 commits into from
Jul 26, 2023
Merged

Reduce sphinx warnings #2221

merged 3 commits into from
Jul 26, 2023

Conversation

lgolston
Copy link
Contributor

Rationale

As @greglucas pointed out in #2220, the CI server shows some warnings while building the docs. Running on a newer version of sphinx (v7.0.1), there is also a warning in GeoSpine.set_position from a link in the inherited docstring. These are addressed here. Some more broken cross-references were also found/cleaned up by looking at the output of sphinx in nitpicky mode.

Notes

  1. This adds the :module: tag to all modules (including sub-modules), so they can be cross-referenced. Previously I had only changed this for the main the top-level modules, which is why there was still a warning about not finding the SRTM modules.

  2. A class.rst template is created, which is used by default. Without this, the methods within a class were not generating HTML anchors that can be linked to, other than in the matplotlib and crs modules where a template was already explicitly used.

  3. Sphinx version <6 needed to be pinned in docs/doc-requirements.txt (DOC: Pin Sphinx less than version 6 #2131), but I think this not needed now due to Standardize logo image behavior between Sphinx and this theme pydata/pydata-sphinx-theme#1132

Implications

Improved cross-referencing throughout the docs.

@lgolston
Copy link
Contributor Author

Okay, now there are several 'Inline emphasis start-string without end-string' warnings from parsing img_nest.py, such as from '*.tif'. I think it can be ignored?

@QuLogic
Copy link
Member

QuLogic commented Jul 25, 2023

Those should be wrapped in double backticks for code styling.

@lgolston
Copy link
Contributor Author

Done. Thanks @QuLogic!

Copy link
Contributor

@greglucas greglucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me and the doc logs are building clean now! Thanks, @lgolston.

@greglucas greglucas merged commit 4cefbf7 into SciTools:main Jul 26, 2023
@lgolston lgolston deleted the sphinx-edit branch July 29, 2023 02:25
@QuLogic QuLogic added this to the 0.22 milestone Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants