Repository navigation
geotiff tests: consolidate coords cluster - #2455
Merged
Merged
Conversation
Fold seven top-level files into read/test_coords.py: - test_coord_regularity_1720.py - test_coords_1813.py - test_coords_to_transform_3d_1643.py - test_int_coord_sentinel_2087.py - test_int_coords_round_trip_hotfix_1962.py - test_multi_tiepoint_validation_2117.py - test_rational_zero_denominator_2313.py The boundary file test_non_uniform_coords_alias_2215.py also folds cleanly because the alias resolution layers onto the same writer-side _coords_to_transform validation already covered in section 5; it lands in the same section. Sections in the extended file: 1. coords_from_pixel_geometry / coords_from_geo_info helpers. 2. _extract_transform multi-tiepoint consistency. 3. Zero-denominator RATIONAL / SRATIONAL rejection. 4. Descending / ascending coord round trip (pre-existing from #2390). 5. _coords_to_transform writer-side validation: regularity, 3D layouts, and alias-aware NonUniformCoordsError. 6. Integer-coord round trip and the _NO_GEOREF_KEY marker. Integration sub-cluster gated on XRSPATIAL_RUN_INTEGRATION=1. CLUSTER_AUDIT_COORDS.md maps every old file::test to its new file::test_id. The audit file is deleted on a final commit before merge. Cluster 4 of long-tail epic #2424. Tests-only -- no source changes.
brendancol
commented
May 26, 2026
brendancol
left a comment
Contributor
Author
There was a problem hiding this comment.
PR Review: geotiff tests: consolidate coords cluster
Blockers
None.
Suggestions
None.
Nits
xrspatial/geotiff/tests/read/test_coords.py:68-78: the local_gpu_available()helper and_HAS_GPUconstant duplicate the sharedrequires_gpumarker from..conftest. The 3D-roundtrip GPU test could swap@pytest.mark.skipif(not _HAS_GPU, reason="cupy + CUDA required")for@requires_gpuand drop the local probe. The originaltest_coords_to_transform_3d_1643.pycarried the same local helper, so this is a faithful fold; worth tidying in a follow-up.xrspatial/geotiff/tests/read/test_coords.py:94-110:_make_da(float32 sequential) and_make_da_uint8(uint8 zeros) sit next to each other and take the same(x_coords, y_coords)arg order. A one-line note in each docstring about which sections use which would save a reader from grepping.
What looks good
- Test count parity verified: 103 collected before, 103 after. I checked out the prior commit and re-collected to confirm.
- Full suite is 5817 passed, 68 skipped, 2 xfailed.
CLUSTER_AUDIT_COORDS.mdmaps every oldfile::testto its new id, including the parametrized variants. PR body says it gets deleted in a pre-merge commit.- Boundary call on
test_non_uniform_coords_alias_2215.pywas folded into section 5 instead of being deferred. The alias-resolution tests really do belong with the rest of the_coords_to_transformwriter-side checks. - Sections are ordered low-level helpers first, then tiepoint, RATIONAL, round trip, writer validation, integer-coord marker. Easy to scan.
- Integration cases stayed behind
requires_integration. - No
xrspatial/geotiff/source touched.
Checklist
- All consolidated tests pass on this checkout
- Test count parity verified (103 = 103)
- No source changes
- Audit file present and complete
- No pyflakes warnings
- Stays in lane (
read/test_coords.py)
- Drop the local _gpu_available()/_HAS_GPU pair in favour of the shared requires_gpu marker from _helpers/markers.py via conftest. - Note in the shared-helpers comment which sections use _make_da (float32 sequential) vs _make_da_uint8 (uint8 zero).
brendancol
commented
May 26, 2026
brendancol
left a comment
Contributor
Author
There was a problem hiding this comment.
Follow-up after nit fixes (d707736)
Both nits from the previous pass are addressed in d707736:
- The local
_gpu_available()/_HAS_GPUpair is gone.test_write_geotiff_gpu_roundtrip_3dnow uses@requires_gpufrom_helpers/markers.pyvia the conftest re-export.importlib.utilimport dropped. - The shared-helpers block carries a comment explaining when to use
_make_da(float32 sequential, for round-trip / orientation tests in section 4) versus_make_da_uint8(uint8 zero, for the_coords_to_transformregularity checks in section 5).
Re-ran after the fixes:
pytest xrspatial/geotiff/tests/read/test_coords.py -q: 101 passed, 2 skipped.pyflakes: clean.
No remaining blockers, suggestions, or nits.
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.
Closes #2428. Cluster 4 of long-tail epic #2424. Tests-only.
Summary
Fold seven top-level coord-edge-case files into the existing
xrspatial/geotiff/tests/read/test_coords.py:test_coord_regularity_1720.pytest_coords_1813.pytest_coords_to_transform_3d_1643.pytest_int_coord_sentinel_2087.pytest_int_coords_round_trip_hotfix_1962.pytest_multi_tiepoint_validation_2117.pytest_rational_zero_denominator_2313.pyThe boundary file
test_non_uniform_coords_alias_2215.pyalso foldscleanly because the alias resolution layers onto the same writer-side
_coords_to_transformvalidation already covered in section 5; it landsin the same section rather than waiting for a follow-up.
Sections in the extended file
coords_from_pixel_geometry/transform_tuple_from_pixel_geometry/
coords_from_geo_infohelpers._extract_transformmulti-tiepoint consistency.RATIONAL/SRATIONALrejection._coords_to_transformwriter-side validation: regularity (1D),3D
(y, x, band)/(band, y, x), and alias-awareNonUniformCoordsErroracrossy/x,lat/lon,latitude/longitude,row/col._NO_GEOREF_KEYmarker.Integration sub-cluster gated on
XRSPATIAL_RUN_INTEGRATION=1.Audit
xrspatial/geotiff/tests/CLUSTER_AUDIT_COORDS.mdmaps every oldfile::testto its newfile::test_id. The audit file is deleted on afinal commit before merge.
Verification
pytest xrspatial/geotiff/tests/read/test_coords.py -v: 101 passed,2 skipped (integration-gated).
pytest xrspatial/geotiff/tests/ -x -q: 5817 passed, 68 skipped,2 xfailed.
find xrspatial/geotiff/tests -name 'test_*.py' | wc -l: 242(was 249; -7 deleted, +0 added because
test_coords.pyalreadyexisted).
Test plan
read/test_coords.pypasses on this checkout.xrspatial/geotiff/tests/suite passes.