Skip to content

Comments

Docs: remove blank rio options docs#3348

Merged
snowman2 merged 8 commits intorasterio:mainfrom
adamjstewart:docs/rio-options
Sep 7, 2025
Merged

Docs: remove blank rio options docs#3348
snowman2 merged 8 commits intorasterio:mainfrom
adamjstewart:docs/rio-options

Conversation

@adamjstewart
Copy link
Contributor

I don't fully understand whether or not rio options is supposed to work, but there is no rst document for it, resulting in the following warning in RtD CI:

/home/docs/checkouts/readthedocs.org/user_builds/rasterio/checkouts/3340/docs/api/rasterio.rio.rst:4: WARNING: toctree contains reference to nonexisting document 'api/rasterio.rio.options' [toc.not_readable]

@sgillies
Copy link
Member

@adamjstewart thanks for looking into this. We do want docs for the module, so it's worth adding a doc for it.

@adamjstewart
Copy link
Contributor Author

Should this command work?

> rio options
Usage: rio [OPTIONS] COMMAND [ARGS]...
Try 'rio --help' for help.

Error: No such command 'options'.

@adamjstewart
Copy link
Contributor Author

Ah, seems like these are simply common/shared flags.

@adamjstewart adamjstewart changed the title Docs: remove rio options documentation Docs: add rio options documentation May 20, 2025
@adamjstewart
Copy link
Contributor Author

Current implementation doesn't work:

/home/docs/checkouts/readthedocs.org/user_builds/rasterio/checkouts/3348/docs/api/rasterio.rio.options.rst:1: ERROR: Module "rasterio.rio.options" has no attribute "options" [docutils]

This file has no click function, so the docs would look completely different. It's still not clear to me what should be documented and how to document it.

@adamjstewart adamjstewart marked this pull request as draft May 21, 2025 10:01
@adamjstewart
Copy link
Contributor Author

Okay, it's working now, although I'm not sure if I like how it's formatted.

@adamjstewart adamjstewart marked this pull request as ready for review May 24, 2025 10:58
@adamjstewart
Copy link
Contributor Author

@sgillies what do you think of the current docs?

@sgillies
Copy link
Member

@adamjstewart the only thing I would ask is that the rasterio.rio.options functions in red (see image) be hidden in the listings of https://rasterio--3348.org.readthedocs.build/en/3348/api/index.html and https://rasterio--3348.org.readthedocs.build/en/3348/api/rasterio.rio.html. Perhaps put under their own rasterio.rio.options.html page.

Untitled

@adamjstewart
Copy link
Contributor Author

Running out of ideas to get this working...

@sgillies
Copy link
Member

sgillies commented Jun 1, 2025

@adamjstewart Thanks for giving it a try! It's okay with me if you don't want to continue. I think Rasterio's API docs section need to be paved over to get a fresh start. I didn't really know what I was doing with sphinx-apidoc when I started, and it's improved since then.

Also, the combination of the project wanting to use sphinx-click for the CLI documentation and something else for rasterio.rio.options (which has no CLI command) is tricky.

@adamjstewart
Copy link
Contributor Author

My personal vote would be to remove the rio options docs for now since they were never displayed to begin with. We can think about how to properly display them after all other warnings are resolved.

@adamjstewart adamjstewart changed the title Docs: add rio options documentation Docs: remove blank rio options docs Jul 19, 2025
@adamjstewart
Copy link
Contributor Author

Went back to the original PR implementation to solve the Sphinx warning.

@adamjstewart
Copy link
Contributor Author

@sgillies is this PR and #3352 #3351 still wanted? If not I'll close, trying to clean out old PRs.

@snowman2 snowman2 merged commit addfeda into rasterio:main Sep 7, 2025
1 check passed
@snowman2
Copy link
Member

snowman2 commented Sep 7, 2025

Thank @adamjstewart 👍

@adamjstewart adamjstewart deleted the docs/rio-options branch September 7, 2025 06:33
@snowman2 snowman2 added the backport-1.4 To be backported to maint-1.4 label Nov 6, 2025
@snowman2 snowman2 added this to the 1.4.4 milestone Nov 6, 2025
snowman2 pushed a commit that referenced this pull request Nov 6, 2025
* Docs: remove rio options documentation

* Add rio options docs

* Simpler documentation structure

* Try to add header

* Change maxdepth

* Change maxdepth

* Change maxdepth

* Back to original PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-1.4 To be backported to maint-1.4 bug documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants