geotiff: cover symbology sidecars on dask, dask+GPU, 3D single-band, color_ramp_range (#3545)#3546
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_sidecarsemit 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_rangeexists as the escape hatch for large dask graphs (it skips the_finite_statsreduction), 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=Trueover a dask array) reaches the same emit closure; ran and passed locally on a CUDA host.test_3d_single_band_emits_sidecars--_is_single_bandreturns 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_statsunit, now checked end-to-end throughto_geotiff.Full file: 25 passed locally, including the GPU legs.
Found by the test-coverage sweep.