Skip to content

Release-gate: eager-vs-dask raster equivalence for representative GeoTIFFs (PR 1 of 5 of epic #2341) #2357

Closed

Description

@brendancol

Reason or Problem

Epic #2341 calls out that the highest release risk for the GeoTIFF surface is pixels matching while attrs, coords, or dims silently disagree across backends. Today, the eager (open_geotiff) and dask (read_geotiff_dask) entry points both promise stable behavior, but no single regression test asserts full raster equivalence — pixels + dims + coords + the seven release-attr keys — across the two paths on the same files.

Proposal

Add xrspatial/geotiff/tests/test_release_gate_eager_dask_parity_2341.py.

For each file in a representative-corpus list (integer dtype + nodata, float dtype + NaN nodata, MinIsWhite, masked_nodata-lifecycle), open it eagerly and via read_geotiff_dask, materialize the dask result, and assert all of:

  • .values bit-exact (NaN-aware)
  • .dims equal
  • .coords element-wise equal under xr.testing.assert_identical-style strictness
  • attrs['transform'], attrs['crs'], attrs['crs_wkt'], attrs['nodata'], attrs['masked_nodata'], attrs['georef_status'], attrs['raster_type'] all equal

The assertions are inlined as a small helper inside the test module (no new shared helper file — keeps the PR self-contained; consolidation across the PR-2..PR-5 sibling tests can be a follow-up). Add a row to docs/source/reference/release_gate_geotiff.rst citing the new test file under "Local GeoTIFF read and write".

Stakeholders and Impacts

Touches: one new test file under xrspatial/geotiff/tests/, one row added to the release-gate doc page. No production code changes. Runtime: bounded to the existing corpus fixtures already used by test_backend_pixel_parity_matrix_1813.py.

Out of scope (sibling PRs of epic #2341):

  • Windowed-read shifted-transform parity (PR 2).
  • Overview / sidecar metadata survival (PR 3).
  • Stable-codec round-trip (PR 4).
  • Negative tests for ambiguous metadata (PR 5).

Drawbacks

Slight overlap with test_backend_full_parity_2211.py, which already checks attrs finalization parity. This PR's test adds the eager-vs-dask cross-backend axis on top, and pins it under a release_gate-themed name so the release checklist row points at one test, not three.

Alternatives

  • Extend test_backend_full_parity_2211.py instead of adding a new file. Rejected: the release-gate doc row needs a stable test path to cite; reusing an existing file couples the row to unrelated future edits.
  • Make the assertions a shared helper module up front. Rejected: that requires sequential ordering across the five sibling PRs; inlining keeps PRs 1-5 independent.

Additional Notes or Context

Parent epic: #2341. Sibling issues to be created for PRs 2-5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions