Skip to content

DOC: Fix various documentation errors and warnings#925

Merged
snowman2 merged 1 commit into
corteva:masterfrom
djhoese:docs-cleanup
May 4, 2026
Merged

DOC: Fix various documentation errors and warnings#925
snowman2 merged 1 commit into
corteva:masterfrom
djhoese:docs-cleanup

Conversation

@djhoese
Copy link
Copy Markdown
Contributor

@djhoese djhoese commented May 4, 2026

I've been running into a weird issue when trying to document my own project that imports rioxarray. While looking into it I found that there are a ton of warnings and errors in rioxarray's own documentation rendering so I fixed all the ones I was hitting locally:

  1. sphinx "language" in conf.py needs a real value now. I went with "en".
  2. Inconsistent title levels in crs_management.ipynb. Basically the titles went from level 2 to level 4 with no level 3 in between. Further "API Documentation" was defined as level 4 but really I think it should be on the same level as the other sections at 3. I fixed what I could find. This is actually a really big deal as these titles just didn't exist in the rendered HTML because of these issues.
  3. Various indentation or bullet type inconsistencies.
  4. Footnotes that were never referenced so switched to bullet points.
  5. Cases of Union[Resampling | str]. This is redundant as the | is a Union. I changed this to match the other cases in the modules with Union[Resampling, str] (note the comma instead of the vertical bar). This is the issue I was running into so I'm hoping once this is merged and released that this will just work for my own project.
  • Closes #xxxx
  • Tests added
  • Fully documented, including docs/history.rst for all changes and docs/rioxarray.rst for new API

@djhoese
Copy link
Copy Markdown
Contributor Author

djhoese commented May 4, 2026

Test failures seem unrelated to my changes.

@snowman2 snowman2 changed the title Fix various documentation errors and warnings DOC: Fix various documentation errors and warnings May 4, 2026
@snowman2 snowman2 added the documentation Documentation related issue label May 4, 2026
@snowman2 snowman2 added this to the 0.23.0 milestone May 4, 2026
@snowman2 snowman2 merged commit 43de28c into corteva:master May 4, 2026
7 of 22 checks passed
@snowman2
Copy link
Copy Markdown
Member

snowman2 commented May 4, 2026

Thanks @djhoese 👍

@djhoese
Copy link
Copy Markdown
Contributor Author

djhoese commented May 5, 2026

I realized I could just hack the rioxarray source in my installed environment and I can confirm that the changes to Union[Resampling | str] have removed these warnings:

WARNING: Failed to import <my_module>.
Possible hints:
* AttributeError: module <my_module> has no attribute 'some_attr'
* TypeError: unsupported operand type(s) for |: 'Resampling' and 'type'

@djhoese djhoese deleted the docs-cleanup branch May 5, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants