Skip to content

geotiff tests: consolidate nodata write-side cluster (Sub-PR B)#2470

Merged
brendancol merged 2 commits into
mainfrom
issue-2434-write
May 27, 2026
Merged

geotiff tests: consolidate nodata write-side cluster (Sub-PR B)#2470
brendancol merged 2 commits into
mainfrom
issue-2434-write

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Closes part of #2434 (Sub-PR B). Cluster 10 of long-tail epic #2424.

Summary

Fold 5 write-side nodata files into a new xrspatial/geotiff/tests/write/test_nodata.py:

  • test_nodata_validation_1973.py (non-numeric / bool rejection at every writer entry point)
  • test_nodata_bool_rejection_1911.py (bool rejection at to_geotiff + build_geo_tags)
  • test_nodata_int64_precision_1847.py (full-precision 64-bit integer sentinels via _parse_nodata_str; eager / dask / VRT / GPU round-trip)
  • test_nodata_out_of_range_1581.py (out-of-range integer sentinel is a value-match no-op rather than OverflowError)
  • test_mask_nodata_kwarg_2052.py (mask_nodata=False keeps the source integer dtype so the dtype= cast contract is reachable)

Tests-only. The shared requires_gpu marker from _helpers/markers.py replaces the per-file _gpu_available / _gpu_only helpers. 87 tests collected, matching the baseline sum.

The release-gate row for nodata round-trip and the geotiff.rst prose are updated to cite write/test_nodata.py alongside the existing read-side files.

Verification

  • pytest xrspatial/geotiff/tests/write/test_nodata.py: 87 passed.
  • pytest xrspatial/geotiff/tests/release_gates/test_stable_features.py::test_release_gate_cites_only_existing_test_files: 1 passed.

Test plan

  • New consolidated write/test_nodata.py passes on this checkout.
  • Release-gate checklist-parity test passes.

Companion PR

The read-side companion (Sub-PR A) is #2469. The two are independent; merging in either order works.

Cluster 10 of long-tail epic #2424. Fold 5 write-side nodata files
into a new ``xrspatial/geotiff/tests/write/test_nodata.py``:

- ``test_nodata_validation_1973.py`` (non-numeric / bool rejection)
- ``test_nodata_bool_rejection_1911.py`` (bool rejection at writer
  + ``build_geo_tags``)
- ``test_nodata_int64_precision_1847.py`` (full-precision 64-bit
  integer sentinels via ``_parse_nodata_str``; eager / dask / VRT /
  GPU round-trip)
- ``test_nodata_out_of_range_1581.py`` (out-of-range int sentinel
  is a value-match no-op rather than OverflowError)
- ``test_mask_nodata_kwarg_2052.py`` (``mask_nodata=False`` keeps
  source integer dtype so the ``dtype=`` cast contract is reachable)

Tests-only. The shared ``requires_gpu`` marker from
``_helpers/markers.py`` replaces the per-file ``_gpu_available`` /
``_gpu_only`` helpers. 87 tests collected, matching the baseline sum.

Refs #2434.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 27, 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: nodata write-side consolidation (Sub-PR B)

Tests-only. Five source files folded into a new write/test_nodata.py. Bodies preserved verbatim.

Blockers: none.

Suggestions: none.

Nits: the file already has # === banners at the top of each of the five sections; the parametrised groups inside each section could carry one-line subheaders for skim-readability, but it is fine as-is.

Verified locally

  • 87 tests collected and pass. Matches the baseline sum (27 + 17 + 25 + 8 + 10).
  • No duplicate test IDs.
  • One shared requires_gpu marker replaces five per-file cupy probes.
  • Release-gate checklist-parity passes; the rst row adds write/test_nodata.py alongside the still-present read-side files.
  • flake8 clean.

Independent of #2469 (the read-side companion). Either merge order works.

# Conflicts:
#	docs/source/reference/release_gate_geotiff.rst
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.

1 participant