Skip to content

geotiff tests: consolidate VRT tail cluster#2464

Merged
brendancol merged 4 commits into
mainfrom
issue-2437
May 26, 2026
Merged

geotiff tests: consolidate VRT tail cluster#2464
brendancol merged 4 commits into
mainfrom
issue-2437

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Closes #2437. Cluster 13 of the long-tail GeoTIFF test consolidation epic (#2424).

Summary

Fold the 12 VRT-tail residue files into existing vrt/ modules plus one new vrt/test_parity.py. No source changes; tests only.

Mapping:

  • Missing-sources trio plus the public-default file -> vrt/test_missing_sources.py. The _1843 internal _vrt.read_vrt entry point and the XRSPATIAL_GEOTIFF_STRICT=1 env override are both preserved; _1860 adds the public read_vrt / open_geotiff('.vrt') default-raise coverage; _1799 and _2265 add the chunked-path policy (vrt_holes at build, raise-at-build, window / band scoping, multi-source preview).
  • SrcRect-validation (_1784), kwarg-drop (_1685), tiled-validation (_1862) -> vrt/test_validation.py.
  • Lazy-chunks (_1798) and direct read_geotiff_dask('.vrt') kwargs (_1795) -> vrt/test_window.py.
  • Backend-parity (_2321), finalization-parity (_2162), backend-coverage (_2026_05_11) -> a new vrt/test_parity.py. These three are cohesive parity / coverage suites with their own harness, so they re-home as a group rather than fold into the matrix harness in parity/test_backend_matrix.py.

The _2321 parity helpers gained one .parent on the golden_corpus fixture path because the file moved from tests/ into tests/vrt/. Every other test is preserved with identical assertions; names dropped trailing issue numbers where the originating file namespaced them.

docs/source/reference/release_gate_geotiff.rst rows that cited the deleted files now cite the consolidated homes, so the checklist-parity gate in release_gates/test_stable_features.py stays green.

Audit

xrspatial/geotiff/tests/CLUSTER_AUDIT_VRT_TAIL.md maps every old file::test to its new file::test_id. It is deleted on a final commit on this branch before merge.

Verification

  • pytest xrspatial/geotiff/tests/vrt/: 477 passed, 1 xfailed.
  • pytest xrspatial/geotiff/tests/release_gates/test_stable_features.py -m release_gate: 158 passed, 1 xfailed.
  • pytest xrspatial/geotiff/tests/: 5820 passed, 68 skipped, 2 xfailed.
  • find xrspatial/geotiff/tests -name 'test_*.py' | wc -l: 175 (was 186; -12 deleted +1 added).

Test plan

  • New vrt/test_parity.py passes.
  • Consolidated vrt/ modules pass.
  • Release-gate checklist-parity gate passes.
  • Full geotiff suite passes.

Fold the 12 VRT-residue files into existing vrt/ modules plus a new
vrt/test_parity.py:

- missing-sources trio (1843 internal entry point + STRICT env, 1860
  public default, 1799/2265 chunked policy) -> vrt/test_missing_sources.py
- srcrect-validation (1784), kwarg-drop (1685), tiled-validation (1862)
  -> vrt/test_validation.py
- lazy-chunks (1798), dask-vrt-kwargs (1795) -> vrt/test_window.py
- backend-parity (2321), finalization-parity (2162), backend-coverage
  (2026_05_11) -> new vrt/test_parity.py

Update release_gate_geotiff.rst rows to cite the consolidated homes so
the checklist-parity gate stays green. CLUSTER_AUDIT_VRT_TAIL.md maps
every old file::test to its new home and is deleted before merge.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 26, 2026
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 VRT tail cluster

Tests-only consolidation. I read the four touched test files in full, the new vrt/test_parity.py, the deleted originals on main, the release-gate checklist, and the checklist-parity gate that enforces it. Verified locally on the PR branch.

Blockers

None.

Suggestions

None blocking.

Nits

  • vrt/test_missing_sources.py has test_build_raises_immediately in both TestChunkedMissingSourcesRaiseSmoke and TestRaiseAtBuild. The node IDs differ because they are class-qualified, so this is not a collision, and it mirrors the _1799 / _2265 split on main. Fine to leave; flagging only in case someone greps bare method names later.

What looks good

  • Test count is conserved. vrt/test_parity.py collects exactly 55 nodes, matching the 55 across the three files it re-homes (_2321 + _2162 + _2026_05_11). The full geotiff suite passes with the same skip/xfail profile (5820 passed, 68 skipped, 2 xfailed), so nothing was silently dropped.
  • The _GOLDEN fixture path in test_parity.py correctly gained one .parent for the move from tests/ to tests/vrt/; it resolves to the real golden_corpus/fixtures dir.
  • The _1843 internal _vrt.read_vrt entry point and the XRSPATIAL_GEOTIFF_STRICT=1 env override are both preserved, as the issue asked.
  • Release-gate .rst rows that cited the deleted files now cite the consolidated homes, and the checklist-parity gate (release_gates/test_stable_features.py -m release_gate) passes: 158 passed, 1 xfailed.
  • The _1784 srcrect tests were ported from tempfile.TemporaryDirectory to tmp_path without changing behaviour; the relative-source VRT still resolves because the VRT and its source share the tmp dir.
  • Helper functions are prefixed per fold (_raise_*, _srcrect_*, _kwarg_drop_*, _vrttail_*, _tiled_validation_*), so no cross-fold helper shadows another.
  • Appended code is clean under the project's max-line-length=100.

Checklist

  • No source changes (tests-only, as required)
  • All implemented backends preserved (GPU tests stay skipif-gated)
  • No tests silently dropped (node count conserved)
  • Release-gate citations updated; checklist-parity gate green
  • Audit file present; deleted before merge
  • Temp / VRT filenames unique per test via tmp_path
  • Full geotiff suite passes

The georef/rotation cluster (#2463) moved test_no_georef_windowed_coords_1710.py
into read/test_georef.py but left the reader.windowed row in
release_gate_geotiff.rst citing the deleted path. Repoint it so the
checklist-parity gate stays green on the merged branch.
@brendancol brendancol merged commit 8ae2e15 into main May 26, 2026
6 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 13: VRT tail (long-tail epic #2424)

1 participant