Skip to content

Document bigtiff kwarg in to_geotiff docstring (#1683)#1686

Merged
brendancol merged 2 commits into
xarray-contrib:mainfrom
brendancol:deep-sweep-api-consistency-geotiff-2026-05-12-v2-01
May 12, 2026
Merged

Document bigtiff kwarg in to_geotiff docstring (#1683)#1686
brendancol merged 2 commits into
xarray-contrib:mainfrom
brendancol:deep-sweep-api-consistency-geotiff-2026-05-12-v2-01

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

  • to_geotiff accepts a bigtiff kwarg, but the Parameters block of the docstring skipped from overview_resampling directly to gpu. write_geotiff_gpu documents the same kwarg already, so the omission only affected the CPU dispatcher's docstring.
  • Add the missing entry between overview_resampling and gpu, using the same wording the GPU writer uses, and pin both writers against future drift with a test that walks the docstring's Parameters block.

Fixes #1683. Found during the geotiff API consistency sweep (Cat 3, MEDIUM).

Test plan

  • pytest xrspatial/geotiff/tests/test_to_geotiff_bigtiff_doc_1683.py
  • Confirms bigtiff is documented for to_geotiff
  • Confirms every signature kwarg of to_geotiff is documented
  • Confirms write_geotiff_gpu keeps full coverage too

The Parameters block jumped from overview_resampling to gpu, omitting
the bigtiff entry that has been on the signature for several releases.
write_geotiff_gpu documents the same kwarg, so callers who learned the
API from the GPU writer and ported a call to to_geotiff had no way to
discover the option from help(to_geotiff). Pin the entry against future
drift with a test that walks the Parameters block and compares it to
inspect.signature().
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 12, 2026
Three MEDIUM findings filed and fixed: xarray-contrib#1683 (bigtiff docstring gap on
to_geotiff), xarray-contrib#1684 (write_vrt nodata float|None widened to
float|int|None), and xarray-contrib#1685 (open_geotiff silently dropped
overview_level / on_gpu_failure on VRT sources). PRs xarray-contrib#1686, xarray-contrib#1687, and
xarray-contrib#1689. cuda-validated.
brendancol added a commit to brendancol/xarray-spatial that referenced this pull request May 12, 2026
Three MEDIUM findings filed and fixed: xarray-contrib#1683 (bigtiff docstring gap on
to_geotiff), xarray-contrib#1684 (write_vrt nodata float|None widened to
float|int|None), and xarray-contrib#1685 (open_geotiff silently dropped
overview_level / on_gpu_failure on VRT sources). PRs xarray-contrib#1686, xarray-contrib#1687, and
xarray-contrib#1689. cuda-validated.
brendancol added a commit to brendancol/xarray-spatial that referenced this pull request May 12, 2026
Three MEDIUM findings filed and fixed: xarray-contrib#1683 (bigtiff docstring gap on
to_geotiff), xarray-contrib#1684 (write_vrt nodata float|None widened to
float|int|None), and xarray-contrib#1685 (open_geotiff silently dropped
overview_level / on_gpu_failure on VRT sources). PRs xarray-contrib#1686, xarray-contrib#1687, and
xarray-contrib#1689. cuda-validated.
@brendancol brendancol merged commit 5e0ba17 into xarray-contrib:main May 12, 2026
4 of 11 checks passed
brendancol added a commit that referenced this pull request May 12, 2026
* Widen write_vrt nodata type hint to accept int (#1684)

write_vrt advertised `nodata: float | None` while the sibling writers
to_geotiff and write_geotiff_gpu accept "float, int, or None" with no
type annotation. Integer sentinels (65535 for uint16, -9999 for int32)
round-trip through the rest of the I/O surface; the float-only hint
was a static-typing trap, not a runtime constraint. Widen to
`float | int | None` on the public wrapper and the internal
_vrt.write_vrt, and document the surface match in both docstrings. Add
a round-trip regression so future drift surfaces.

* Update api-consistency sweep state for geotiff v2 (2026-05-12)

Three MEDIUM findings filed and fixed: #1683 (bigtiff docstring gap on
to_geotiff), #1684 (write_vrt nodata float|None widened to
float|int|None), and #1685 (open_geotiff silently dropped
overview_level / on_gpu_failure on VRT sources). PRs #1686, #1687, and
#1689. cuda-validated.
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: to_geotiff Parameters docstring omits bigtiff

1 participant