Skip to content

geotiff: cover symbology sidecars on dask, dask+GPU, 3D single-band, color_ramp_range (#3545)#3546

Merged
brendancol merged 1 commit into
mainfrom
deep-sweep-test-coverage-geotiff-2026-06-26-01
Jun 27, 2026
Merged

geotiff: cover symbology sidecars on dask, dask+GPU, 3D single-band, color_ramp_range (#3545)#3546
brendancol merged 1 commit into
mainfrom
deep-sweep-test-coverage-geotiff-2026-06-26-01

Conversation

@brendancol

Copy link
Copy Markdown
Contributor

Test-only. Closes #3545.

The continuous-symbology sidecars from #3537 (to_geotiff(color_ramp=...)) are covered on the eager numpy write path, but four branches of the shared _write_sidecars emit had no test driving them. I probed all four on a CUDA host and they behave correctly, so these are coverage gaps rather than bugs.

Added to xrspatial/geotiff/tests/write/test_symbology_sidecar_3537.py:

  • test_dask_color_ramp_range_sets_bounds -- color_ramp_range exists as the escape hatch for large dask graphs (it skips the _finite_stats reduction), so the bounds and the omitted mean/stddev pass are now asserted on a dask array, not just numpy.
  • test_dask_gpu_write_emits_sidecars (requires_gpu) -- the dask+cupy write path (gpu=True over a dask array) reaches the same emit closure; ran and passed locally on a CUDA host.
  • test_3d_single_band_emits_sidecars -- _is_single_band returns True for a 3D array with a length-1 band dim; that branch had no coverage.
  • test_nodata_attr_excluded_from_ramp_bounds -- attrs['nodata'] exclusion was verified only in the _finite_stats unit, now checked end-to-end through to_geotiff.

Full file: 25 passed locally, including the GPU legs.

Found by the test-coverage sweep.

…color_ramp_range (#3545)

The continuous-symbology sidecars from #3537 are covered on the eager numpy
path, but four branches of the shared _write_sidecars emit had no test:

- color_ramp_range only asserted its written bounds on a numpy array, yet the
  kwarg exists as the escape hatch for large dask graphs (it skips the
  _finite_stats reduction). The dask test only checked file existence.
- The dask+cupy write path (gpu=True over a dask array) reaches the same emit
  closure but no test drove it.
- _is_single_band returns True for a 3D array with a length-1 band dim; only
  the 2D and multiband-skip branches were tested.
- attrs['nodata'] exclusion was verified only in the _finite_stats unit, never
  end-to-end through to_geotiff.

All four were probed on a CUDA host and behave correctly, so these are
coverage gaps, not bugs. Test-only: adds four tests to
test_symbology_sidecar_3537.py (the dask+GPU one ran and passed locally).

Closes #3545
@brendancol brendancol merged commit 08557e6 into main Jun 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

geotiff: cover symbology sidecars (#3537) on dask, dask+GPU, 3D single-band, and color_ramp_range

1 participant