Skip to content

Commit 2d18207

Browse files
brendancolCopilot
andauthored
Deep sweep test coverage geotiff 2026 05 11 (#1596)
* Cover dask-streaming codec gap and cubic overview 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. * Remove unused imports in streaming codec tests ruff flagged `os` and `dask.array as darr` as unused. Replace the bound `dask = pytest.importorskip("dask")` with a discarding call. * Soften incorrect packbits-only-uint8 claim in test commentary 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). --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: brendancol <433221+brendancol@users.noreply.github.com>
1 parent c5e873d commit 2d18207

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

xrspatial/geotiff/tests/test_streaming_codecs_2026_05_11.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
* Dask streaming write + LERC (lossless and lossy ``max_z_error``)
1010
produces identical output to the eager writer.
1111
* Dask streaming write + LZ4 round-trips a float32 raster.
12-
* Dask streaming write + packbits round-trips a uint8 raster (the only
13-
dtype packbits supports in this writer).
12+
* Dask streaming write + packbits round-trips a uint8 raster. packbits
13+
operates on the raw byte stream so any dtype is technically supported;
14+
uint8 is the variant exercised here and the one packbits was designed
15+
for (run-length encoding of byte runs).
1416
* COG output with ``overview_resampling='cubic'`` round-trips through
1517
scipy.ndimage.zoom (the only overview method that takes a separate
1618
code path in ``_block_reduce_2d``).
@@ -139,7 +141,7 @@ def test_streaming_matches_eager(self, float_raster, dask_float_raster,
139141

140142

141143
# ---------------------------------------------------------------------------
142-
# packbits: round-trip on uint8 (the only supported dtype)
144+
# packbits: round-trip on uint8 (the dtype packbits is designed for)
143145
# ---------------------------------------------------------------------------
144146

145147
class TestStreamingPackbits:

0 commit comments

Comments
 (0)