geotiff tests: consolidate kwarg / signature cluster (Sub-PR A)#2458
Merged
Conversation
Fold nine top-level kwarg and signature test files into a new xrspatial/geotiff/tests/unit/test_signatures.py, organised into six sections by concern: parameter annotations (#1654, #1705), canonical reader kwarg order (#1935), experimental / internal-only opt-in gates (#2352), the photometric kwarg and extra_tags override (#1769), the gil_friendly deflate kwarg (#1830), and the 2026-05-12 reader / writer kwarg-behaviour coverage sweep. GPU gating moves to the shared requires_gpu marker from _helpers/markers.py, replacing the per-file _gpu_available helpers. No assertion changed; the consolidated file collects the same 167 tests as the nine source files. CLUSTER_AUDIT_KWARG.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.
brendancol
commented
May 26, 2026
Contributor
Author
brendancol
left a comment
There was a problem hiding this comment.
PR Review: geotiff tests consolidate kwarg / signature cluster (Sub-PR A)
Tests-only consolidation. I read the new unit/test_signatures.py in full and compared it against the nine deleted source files. The domain-specific checks (algorithm accuracy, backend dispatch, dask/cupy kernels) do not apply here since no source changed, so the review is about whether the consolidation keeps coverage intact and stays correct.
Blockers
None.
Suggestions
None.
Nits
xrspatial/geotiff/_encode.py:382and:529have comments that nametest_gil_friendly_kwarg_1830, which this PR deletes. The pinned contract now lives inunit/test_signatures.py::test_write_tiled_parallel_passes_gil_friendly_positionally, so those comments are now stale. This is out of scope for a tests-only PR (no source edits), so I am flagging it for a follow-up rather than fixing it here.
What looks good
- Test count is preserved exactly: 167 collected before and after.
- No test was dropped or merged. The audit file maps every old
file::testto its new id. - GPU gating moved from the per-file
_gpu_available/_gpu_onlyhelpers to the sharedrequires_gpumarker (20 decorations), which satisfies the issue's "markers from_helpers/markers.py" constraint. - Shared helpers lifted to module scope (
_annotated_smoke_da, and_write_tile_to_vrtusing the module-levelwriteimport) with no duplicate top-level defs, classes, or fixtures. - No leftover imports of the deleted files anywhere in the tree.
- isort and flake8 clean.
Checklist
- Test count preserved (167 -> 167)
- GPU tests still gated correctly (requires_gpu)
- No dropped or duplicated tests
- Audit file maps every old test to its new id
- Imports resolve; lint clean
- [n/a] Algorithm / dask / cupy 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.
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 #2431 (Sub-PR A of two). Cluster 7 of the long-tail GeoTIFF test consolidation epic (#2424). Tests-only.
Summary
Fold nine top-level kwarg and signature files into a new
xrspatial/geotiff/tests/unit/test_signatures.py, grouped into six sections by concern:test_signature_annotations_1654.pytest_signature_annotations_1705.pytest_reader_kwarg_order_1935.pytest_experimental_internal_optin_2352.pytest_photometric_kwarg_1769.pytest_gil_friendly_kwarg_1830.pytest_kwarg_coverage_2026_05_11_r4.pytest_kwarg_behaviour_2026_05_12.pytest_kwarg_behaviour_2026_05_12_v2.pyThe six sections are parameter annotations (#1654, #1705), canonical reader kwarg order (#1935), experimental / internal-only opt-in gates (#2352), the photometric kwarg and extra_tags override (#1769), the gil_friendly deflate kwarg (#1830), and reader / writer kwarg behaviour from the 2026-05-12 coverage sweep.
GPU gating moves to the shared
requires_gpumarker from_helpers/markers.py, replacing the per-file_gpu_availablehelpers. No assertion changed.Audit
xrspatial/geotiff/tests/CLUSTER_AUDIT_KWARG.mdmaps every oldfile::testto its newfile::test_id. The audit file is deleted in a final pre-merge commit.Verification
pytest xrspatial/geotiff/tests/unit/test_signatures.py -v: 167 passed (same total as the nine source files).pytest xrspatial/geotiff/tests/ --co -q: 5891 tests collected, no errors.Test plan
unit/test_signatures.pypasses on this checkout (GPU present).xrspatial/geotiff/tests/suite collects.