Skip to content

Fix read_geotiff_gpu/read_vrt docstring gaps and stale read_geotiff refs (#1637)#1638

Merged
brendancol merged 1 commit into
mainfrom
deep-sweep-api-consistency-geotiff-2026-05-11-1637
May 12, 2026
Merged

Fix read_geotiff_gpu/read_vrt docstring gaps and stale read_geotiff refs (#1637)#1638
brendancol merged 1 commit into
mainfrom
deep-sweep-api-consistency-geotiff-2026-05-11-1637

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

Closes #1637. Three doc/comment fixes and one stale import. No signature
or behavior change.

  • read_geotiff_gpu: add the missing dtype entry to the Parameters
    block. The signature already accepted it; sibling read functions
    (open_geotiff, read_geotiff_dask, read_vrt) all documented it.
  • read_vrt: add the missing max_pixels entry to the Parameters
    block. Signature already accepted it; the three sibling read
    functions all documented it.
  • read_geotiff_dask: fix the stale read_geotiff reference in a
    comment to say open_geotiff (the function it refers to).
  • xrspatial/tests/bench_reproject_vs_rioxarray.py: switch the stale
    from xrspatial.geotiff import read_geotiff import to open_geotiff.
    Not in CI; the script never ran since the rename.

Found by /sweep-api-consistency Cat 3 (docstring/signature drift).

Test plan

  • Local: signature-vs-docstring parity script confirms all four
    public read functions document every signature param.
  • Local: to_geotiff -> open_geotiff round-trip with dtype= and
    max_pixels= kwargs.
  • CI: existing geotiff suite stays green (no behavior change).

)

read_geotiff_gpu and read_vrt accepted dtype/max_pixels in their
signatures but omitted them from the Parameters docstring block.
Sibling read functions (open_geotiff, read_geotiff_dask) document
both. Adds the missing entries.

Also fixes two stale references to the long-removed read_geotiff
function: a comment in read_geotiff_dask that should say
open_geotiff, and an import in bench_reproject_vs_rioxarray.py.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 12, 2026
@brendancol brendancol requested a review from Copilot May 12, 2026 00:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes docstring/signature drift and stale references in the GeoTIFF/VRT reader surface, improving API discoverability without changing behavior.

Changes:

  • Document dtype in read_geotiff_gpu and max_pixels in read_vrt to match existing signatures.
  • Update a stale internal comment referencing the removed read_geotiff symbol.
  • Fix a benchmark script import to use open_geotiff instead of the removed read_geotiff.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
xrspatial/geotiff/__init__.py Docstring parameter coverage fixes (dtype, max_pixels) and update stale comment reference to open_geotiff.
xrspatial/tests/bench_reproject_vs_rioxarray.py Replace stale read_geotiff import/call with open_geotiff to match current public API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@brendancol brendancol merged commit d9e1a5b into main May 12, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

geotiff: read_geotiff_gpu and read_vrt docstrings omit documented kwargs

2 participants