Skip to content

geotiff tests: consolidate kwarg / signature cluster (Sub-PR A)#2458

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

geotiff tests: consolidate kwarg / signature cluster (Sub-PR A)#2458
brendancol merged 3 commits into
mainfrom
issue-2431-signatures

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

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.py
  • test_signature_annotations_1705.py
  • test_reader_kwarg_order_1935.py
  • test_experimental_internal_optin_2352.py
  • test_photometric_kwarg_1769.py
  • test_gil_friendly_kwarg_1830.py
  • test_kwarg_coverage_2026_05_11_r4.py
  • test_kwarg_behaviour_2026_05_12.py
  • test_kwarg_behaviour_2026_05_12_v2.py

The 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_gpu marker from _helpers/markers.py, replacing the per-file _gpu_available helpers. No assertion changed.

Audit

xrspatial/geotiff/tests/CLUSTER_AUDIT_KWARG.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/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

  • New unit/test_signatures.py passes 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 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.
@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 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:382 and :529 have comments that name test_gil_friendly_kwarg_1830, which this PR deletes. The pinned contract now lives in unit/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::test to its new id.
  • GPU gating moved from the per-file _gpu_available / _gpu_only helpers to the shared requires_gpu marker (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_vrt using the module-level write import) 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.
@brendancol brendancol merged commit 07d031a 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