geotiff: document allow_rotated and shared kwargs on all read entry points (#2274)#2275
Merged
brendancol merged 3 commits intoMay 22, 2026
Merged
Conversation
…oints (#2274) The four public read entry points (open_geotiff, read_geotiff_dask, read_geotiff_gpu, read_vrt) accepted allow_rotated and allow_unparseable_crs but only open_geotiff mentioned them (and allow_unparseable_crs only in the Tier prose paragraph, not the Parameters section). The three direct backends also accepted several gated kwargs (missing_sources, band_nodata, on_gpu_failure, max_cloud_bytes, overview_level on VRT) that raise ValueError on the wrong backend for error symmetry; those had no Parameters entry on the backends where they raise. Add Parameters-section entries for every signature kwarg on every read entry point. Functional kwargs get full descriptions; gated kwargs get a short pointer at the owning backend so the long form lives in one place. Add test_read_entry_points_doc_param_parity_2274.py to pin the fix and catch any future kwarg added without a matching Parameters entry on any of the four readers. Scope is documentation-only. No signature, default, or dispatch logic changes. Verified via inspect.signature vs inspect.getdoc scan, plus a CUDA smoke test of read_geotiff_gpu(allow_rotated=True).
brendancol
commented
May 21, 2026
Contributor
Author
brendancol
left a comment
There was a problem hiding this comment.
PR Review: docstring parity for geotiff read entry points
Blockers
None.
Suggestions
None.
Nits
xrspatial/geotiff/_backends/gpu.py, newband_nodataentry: "GPU reads do not go through the VRT pipeline" is a touch imprecise. The dispatcher rejectsband_nodatafor non-VRT sources;read_geotiff_gpurejects all VRT sources up front. Current wording reads fine, just flagging.
What looks good
- Diff is documentation-only as advertised. No signature, default, or dispatch logic changes.
- The new regression test covers both directions (signature kwarg without a doc entry, and doc entry without a signature kwarg) and adds targeted assertions on the two shared kwargs the bug actually named.
- Docstring claims about dispatch errors line up with the rules in
_validation.pyand the existingtest_dispatch_validation_parity_2162.py/test_open_geotiff_on_gpu_failure_1615.py/test_open_geotiff_missing_sources_1810.pycoverage. - Pattern matches the #2106 annotation-parity fix, which is a sensible model.
Checklist
- Algorithm matches reference -- N/A, docs only
- Backends consistent -- N/A, no behaviour change
- NaN handling -- N/A
- Edge cases tested -- 16 parametrised cases over the 4 readers
- Dask chunk boundaries -- N/A
- No premature materialization -- N/A
- Benchmark needed -- N/A
- README feature matrix -- N/A, no new function
- Docstrings present and accurate -- the point of this PR
brendancol
commented
May 21, 2026
Contributor
Author
brendancol
left a comment
There was a problem hiding this comment.
Follow-up: Nit addressed
- Updated
read_geotiff_gpuband_nodataParameters entry to state the actual rule (the GPU dispatcher rejects.vrtsources up front) instead of the imprecise "GPU reads do not go through the VRT pipeline" wording. Commit 955b29d. - No code change; pure docstring polish.
- Regression test still passes (16/16 in
test_read_entry_points_doc_param_parity_2274.py).
Contributor
Author
Independent review (deep-sweep follow-up pass)Ran a fresh review against a clean worktree ( BlockersNone. SuggestionsNone. Nits
Verification
CI statusAll 4 required jobs green (label, pytest ubuntu/macos/windows on 3.14). Readthedocs status is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2274.
Summary
allow_rotated,allow_unparseable_crs) and the five gated kwargs that previously sat in the signature without any docstring entry.open_geotiff/read_vrt/read_geotiff_gpufor the long form so the description lives in one place per kwarg.Scope
Documentation-only. No signature changes, no default changes, no dispatch logic changes.
Backends touched
open_geotiff)allow_unparseable_crsParameters entry (was only in Tier prose)read_geotiff_dask)allow_rotated,allow_unparseable_crs,on_gpu_failure,missing_sources,max_cloud_bytesread_geotiff_gpu)allow_rotated,allow_unparseable_crs,band_nodata,missing_sources,max_cloud_bytesread_vrt)allow_rotated,allow_unparseable_crs,overview_level,on_gpu_failure,max_cloud_bytesTest plan
pytest xrspatial/geotiff/tests/test_read_entry_points_doc_param_parity_2274.py— 16 cases passpytest xrspatial/geotiff/tests/test_open_geotiff_max_cloud_bytes_annot_2106.py— prior geotiff: open_geotiff(max_cloud_bytes=...) missing type annotation #2106 regression still passespytest xrspatial/geotiff/tests/ -k "annot or doc or signature or parity_dispatch or rotated"— 183 passed, 2 skippedread_geotiff_gpu(path, allow_rotated=True)returns CuPy-backed DataArray on a host withCUDA_AVAILABLE=trueOrigin
Found by the API consistency sweep for the geotiff module on 2026-05-21. Branch follows the sweep's fan-out naming convention.