Skip to content

Deep sweep test coverage geotiff 2026 05 11#1596

Merged
brendancol merged 5 commits into
mainfrom
deep-sweep-test-coverage-geotiff-2026-05-11
May 11, 2026
Merged

Deep sweep test coverage geotiff 2026 05 11#1596
brendancol merged 5 commits into
mainfrom
deep-sweep-test-coverage-geotiff-2026-05-11

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Fixes #

Proposed Changes

Adds test_streaming_codecs_2026_05_11.py with 9 tests for the codec
paths in the dask streaming writer and the scipy-backed cubic overview
resampler that were not exercised in the existing test matrix:

- TestStreamingLerc: lossless round-trip, lossy max_z_error budget,
  and eager-vs-streaming byte-for-byte parity.
- TestStreamingLz4: round-trip and eager parity.
- TestStreamingPackbits: uint8 round-trip and eager parity.
- TestCubicOverview: scipy.ndimage.zoom code path exercised via COG
  write, including a quadratic-ramp test that distinguishes cubic
  from mean output.

The eager writer covered these codecs already; the streaming path
that fires for dask-backed inputs feeds the same _compress_block but
had no test coverage for these codecs. Cubic overview routed through
scipy was likewise untested.

Updates .claude/sweep-test-coverage-state.csv for the 2026-05-11
test-coverage sweep run on geotiff.
ruff flagged `os` and `dask.array as darr` as unused. Replace the
bound `dask = pytest.importorskip("dask")` with a discarding call.
Copilot flagged the docstring and section comment claiming packbits in
this writer only supports uint8. packbits operates on the raw byte
stream, so any dtype is technically supported; uint8 is just the variant
this test exercises (and the dtype packbits was designed for).
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 11, 2026
@brendancol
Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

…age-geotiff-2026-05-11

# Conflicts:
#	xrspatial/geotiff/tests/test_streaming_codecs_2026_05_11.py

Co-authored-by: brendancol <433221+brendancol@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

@copilot resolve the merge conflicts in this pull request

Resolved in 5c5a5e7 by merging latest main into this branch and fixing the conflict in test_streaming_codecs_2026_05_11.py to keep the corrected packbits wording. Targeted geotiff tests passed locally after resolution.

@brendancol brendancol merged commit 2d18207 into main May 11, 2026
1 check was pending
brendancol added a commit that referenced this pull request May 11, 2026
…) (#1620)

* Cover read_vrt GPU/dask+GPU paths and a few VRT parameter combos (#1619)

Sweep 3 of the geotiff deep-sweep test-coverage pass (2026-05-11). The
prior two same-day passes (#1565, #1586, #1596) closed dask streaming
codec coverage and the specific accuracy bugs that surfaced. This file
closes the remaining backend-coverage holes:

* ``read_vrt(gpu=True)`` returns cupy (no prior test).
* ``read_vrt(gpu=True, chunks=N)`` returns dask Array with cupy ``_meta``
  and the requested chunk shape (no prior test).
* ``open_geotiff('.vrt', gpu=True[, chunks=N])`` routes through
  ``read_vrt`` and surfaces cupy data unchanged.
* ``read_vrt(dtype='float64')`` safe widening; ``dtype='int32'`` rejected
  for a float source (mirrors the ``open_geotiff`` gate).
* ``read_vrt(name='custom')`` override; default-from-stem fallback.
* ``open_geotiff(BytesIO, gpu=True)`` and ``open_geotiff(BytesIO,
  chunks=N)`` raise ``ValueError`` -- the file-like rejection branches
  were unreached by any prior test.

11 new tests, all passing locally on a CUDA host. GPU tests use the same
cupy availability skip predicate as the rest of the geotiff suite, so
non-GPU CI cleanly skips them.

Test-only change. State CSV updated to record sweep 3 outcome.

Refs #1619.

* Address Copilot review on #1620

- Remove unused xarray import.
- Rename _cuda_available / _HAS_CUDA to _gpu_available / _HAS_GPU so
  the GPU skip predicate matches the rest of the geotiff test suite
  (test_backend_kwarg_parity_1561, test_attrs_parity_1548, and the
  18 other test files use this name).
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.

2 participants