Skip to content

geotiff tests: consolidate parity tail cluster (Sub-PR B)#2462

Merged
brendancol merged 3 commits into
mainfrom
issue-2431-parity
May 26, 2026
Merged

geotiff tests: consolidate parity tail cluster (Sub-PR B)#2462
brendancol merged 3 commits into
mainfrom
issue-2431-parity

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Closes #2431 (Sub-PR B of two). Cluster 7 of the long-tail GeoTIFF test consolidation epic (#2424). Tests-only.

Summary

Fold eight top-level parity files into three focused siblings next to parity/test_backend_matrix.py, grouped by concern:

  • parity/test_finalization.py -- read-finalization parity:
    • test_dispatch_validation_parity_2162.py
    • test_eager_finalization_parity_2162.py
    • test_lazy_finalization_parity_2162.py
  • parity/test_signature_contract.py -- signature / docstring / release-contract parity:
    • test_signature_parity_1631.py
    • test_read_entry_points_doc_param_parity_2274.py
    • test_release_contract_parity_2389.py
  • parity/test_reference.py -- degenerate-shape backend parity and external-reference round trips:
    • test_degenerate_shapes_backends_2026_05_11.py
    • test_round_trip_parity_rasterio_zarr_1961.py

backend_matrix.py is already 2090 lines; appending all eight files (~2578 lines) would push it past 4600. The issue allows a sibling once backend_matrix grows past 2500 lines. Three siblings keep each file well under that ceiling and group related tests together. The two signature-flavoured files (#1631, #2274) land with the release-contract gate so the contract-style parity files share a home; no test is duplicated against Sub-PR A.

GPU gating moves to the shared requires_gpu marker from _helpers/markers.py. The release-contract repo-root path moves from parents[3] to parents[4] to track the new directory depth. No assertion changed.

Audit

xrspatial/geotiff/tests/CLUSTER_AUDIT_PARITY.md maps every old file::test to its new file::test_id. The audit file is deleted in a final pre-merge commit.

Verification

  • pytest xrspatial/geotiff/tests/parity/test_finalization.py xrspatial/geotiff/tests/parity/test_signature_contract.py xrspatial/geotiff/tests/parity/test_reference.py -q: 137 passed (same total as the eight source files).
  • pytest xrspatial/geotiff/tests/parity/ -q: 575 passed, 43 skipped.
  • pytest xrspatial/geotiff/tests/ --co -q: 5891 tests collected, no errors.

Test plan

  • Three new parity/ files pass on this checkout (GPU present).
  • Full xrspatial/geotiff/tests/ suite collects.
  • CI green across numpy / cupy / dask+numpy / dask+cupy.
  • Audit file deleted on the pre-merge commit.

Fold eight top-level parity test files into three focused siblings next
to parity/test_backend_matrix.py, grouped by concern:

- parity/test_finalization.py: read-finalization parity (dispatch
  validation #2175, eager #2179, lazy #2178; epic #2162).
- parity/test_signature_contract.py: signature / docstring / release-
  contract parity (#1631, #2274, #2389).
- parity/test_reference.py: degenerate-shape backend parity and the
  rasterio / Zarr external-reference round trip (2026-05-11 sweep, #1961).

backend_matrix.py is already 2090 lines; appending all eight files would
push it past 4600. Three siblings keep each file well under the 2500-line
guidance in the issue and group related tests together.

GPU gating moves to the shared requires_gpu marker from
_helpers/markers.py, replacing the per-file _gpu_available helpers. No
assertion changed; the three files collect the same 137 tests as the
eight source files.

CLUSTER_AUDIT_PARITY.md maps every old file::test to its new
file::test_id and is deleted in a final pre-merge commit per epic #2424.

Tests-only -- no source changes.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 26, 2026
Move the runtime GPU probe used by the lazy-finalization cross-backend
assertions above its first call site so the helper reads in definition
order. No behaviour change; the call-time resolution was already correct.
Copy link
Copy Markdown
Contributor Author

@brendancol brendancol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: geotiff tests consolidate parity tail cluster (Sub-PR B)

Tests-only consolidation. I read all three new parity files in full and compared them against the eight deleted source files. No source changed, so the domain-specific checks (algorithm accuracy, backend dispatch, cuda kernels) do not apply. The review is about whether the consolidation keeps coverage intact and whether the two non-trivial edits (the repo-root path depth change and the cross-module import) are correct.

Blockers

None.

Suggestions

None.

Nits

  • parity/test_finalization.py defined _gpu_dask_available() below its first call site. It resolved fine at call time, but reading in definition order is cleaner. Fixed in 441e0f1 by hoisting the helper above the lazy-section fixtures.

What looks good

  • Test count preserved exactly: 137 collected before and after (81 + 25 + 31 across the three siblings).
  • Splitting into three siblings rather than one large append keeps every file well under the issue's 2500-line ceiling. backend_matrix.py would have hit roughly 4600 lines if everything landed there.
  • The load-bearing edit checks out: test_signature_contract.py moves _REPO_ROOT from parents[3] to parents[4] because the file sits one directory deeper now. I verified the path resolves to the repo root and the release-contract section passes (25 passed).
  • The cross-module import from ..read.test_crs import _write_rotated_tiff resolves and the lazy-finalization georef tests pass.
  • GPU gating moved to the shared requires_gpu marker. The _BACKENDS parametrize marks and the inline conditional skips are both preserved via the runtime _gpu_dask_available probe.
  • No duplicate top-level defs or classes in any file; the whole parity dir collects together cleanly (618 tests).
  • isort and flake8 clean.

Checklist

  • Test count preserved (137 -> 137)
  • Repo-root path depth corrected for the new location
  • Cross-module import resolves
  • GPU gating preserved (requires_gpu + runtime probe)
  • No dropped or duplicated tests; audit maps every old test
  • Imports resolve; lint clean
  • [n/a] Algorithm / cuda correctness (no source changed)
  • [n/a] README feature matrix (tests-only)

Epic #2424 HARD GATE: the per-cluster audit map lives on the branch
during review and is removed in a final pre-merge commit.
@brendancol brendancol merged commit f360eea into main May 26, 2026
6 of 7 checks passed
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.

Consolidation cluster 7: kwarg / signature / parity tails (long-tail epic #2424)

1 participant