Skip to content

Commit e23d9b6

Browse files
committed
geotiff tests: consolidate rotated-CRS cluster (#2396)
Folds three rotated / dropped-CRS test files into a single parametrized file at ``read/test_crs.py`` under the layout established by epic #2390 PR 1: * ``test_allow_rotated_geotiff_2115.py`` * ``test_allow_rotated_crs_drop_2126.py`` * ``test_allow_rotated_no_crs_2122.py`` Parametrizes scenarios as ``rotated_no_crs``, ``rotated_with_crs``, ``axis_aligned_with_crs`` with ``eager`` / ``dask`` backend axes. The GPU eager + dask+CuPy cases stay gated by ``@requires_gpu``. The two cross-file ``_write_rotated_tiff`` consumers (``test_georef_status_2136.py``, ``test_lazy_finalization_parity_2162.py``) now import from ``read/test_crs.py``. The release-gate and reference docs that cite the old filenames are updated to point at the new file. The HTTP rotated test (``test_http_dask_allow_rotated_2130.py``) is left in place; it belongs to PR 9 (integration cluster). ``CLUSTER_AUDIT_PR3.md`` maps every old ``file::test`` to its new ``file::test_id`` and is removed in a follow-up commit before approval. Part of epic #2390.
1 parent 04514ad commit e23d9b6

10 files changed

Lines changed: 695 additions & 743 deletions

docs/source/reference/geotiff.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@ has non-zero rotation or shear coefficients by default. Pass
110110
6-tuple on ``attrs['rotated_affine']`` and drops ``attrs['crs']`` so
111111
downstream math cannot silently mix a rotated grid with an
112112
axis-aligned CRS. The dropped-CRS rule is locked by
113-
``xrspatial/geotiff/tests/test_allow_rotated_crs_drop_2126.py``,
114-
``xrspatial/geotiff/tests/test_allow_rotated_no_crs_2122.py``, and
115-
``xrspatial/geotiff/tests/test_allow_rotated_geotiff_2115.py``. The
113+
``xrspatial/geotiff/tests/read/test_crs.py``. The
116114
HTTP dask path honours the same opt-in via
117115
``xrspatial/geotiff/tests/test_http_dask_allow_rotated_2130.py``.
118116
Without ``allow_rotated=True`` the read raises a typed error; see

docs/source/reference/release_gate_geotiff.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,7 @@ attrs contract
451451
- Rotated reads surface ``rotated_affine`` and drop ``crs`` so
452452
downstream math cannot silently mix a rotated grid with an
453453
axis-aligned CRS.
454-
- ``xrspatial/geotiff/tests/test_allow_rotated_crs_drop_2126.py``,
455-
``xrspatial/geotiff/tests/test_allow_rotated_no_crs_2122.py``,
456-
``xrspatial/geotiff/tests/test_allow_rotated_geotiff_2115.py``
454+
- ``xrspatial/geotiff/tests/read/test_crs.py``
457455
- `#2340`_
458456
* - ``reader.allow_unparseable_crs``
459457
- experimental
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Cluster audit -- epic #2390 PR 3 (rotated / dropped CRS)
2+
3+
Maps every old `file::test` from the three folded files to its new
4+
`read/test_crs.py::test_id`. **This file is deleted on the final commit
5+
before the PR is approved; it must not land on `main`.**
6+
7+
The HTTP rotated read (`test_http_dask_allow_rotated_2130.py`) is left
8+
in place; it belongs to PR 9 (integration).
9+
10+
## `test_allow_rotated_geotiff_2115.py`
11+
12+
| Old file::test | New file::test_id | Notes |
13+
|---|---|---|
14+
| `test_allow_rotated_geotiff_2115.py::test_extract_transform_rejects_rotated_by_default` | `read/test_crs.py::test_extract_transform_rotated_default_raises` | renamed for clarity |
15+
| `test_allow_rotated_geotiff_2115.py::test_extract_transform_allow_rotated_returns_no_georef` | `read/test_crs.py::test_extract_transform_rotated_optin_returns_no_georef` | renamed |
16+
| `test_allow_rotated_geotiff_2115.py::test_extract_transform_allow_rotated_passes_through_axis_aligned` | `read/test_crs.py::test_extract_transform_axis_aligned_optin_passes_through` | renamed |
17+
| `test_allow_rotated_geotiff_2115.py::test_open_geotiff_rotated_default_raises` | `read/test_crs.py::test_open_geotiff_rotated_no_crs_default_raises[eager]` | parametrized |
18+
| `test_allow_rotated_geotiff_2115.py::test_open_geotiff_rotated_allow_rotated_reads_pixels` | `read/test_crs.py::test_open_geotiff_rotated_no_crs_optin_reads_pixels[eager]` | parametrized |
19+
| `test_allow_rotated_geotiff_2115.py::test_open_geotiff_rotated_default_raises_with_dask` | `read/test_crs.py::test_open_geotiff_rotated_no_crs_default_raises[dask]` | parametrized |
20+
| `test_allow_rotated_geotiff_2115.py::test_open_geotiff_rotated_allow_rotated_with_dask` | `read/test_crs.py::test_open_geotiff_rotated_no_crs_optin_reads_pixels[dask]` | parametrized |
21+
| `test_allow_rotated_geotiff_2115.py::test_open_geotiff_http_rotated_default_raises` | -- | DROPPED. HTTP rotated coverage already exists in `test_http_dask_allow_rotated_2130.py` (PR 9 integration cluster). Local-file rotated raise is pinned by `test_open_geotiff_rotated_no_crs_default_raises[eager]`. |
22+
| `test_allow_rotated_geotiff_2115.py::test_open_geotiff_http_rotated_allow_rotated_reads_pixels` | -- | DROPPED. Same rationale as above; PR 9 integration cluster owns end-to-end HTTP rotated reads. |
23+
24+
## `test_allow_rotated_crs_drop_2126.py`
25+
26+
| Old file::test | New file::test_id | Notes |
27+
|---|---|---|
28+
| `test_allow_rotated_crs_drop_2126.py::test_rotated_optin_drops_crs_epsg` | `read/test_crs.py::test_populate_attrs_rotated_optin_drops_attr[crs]` | parametrized over `crs` / `crs_wkt` / `transform` |
29+
| `test_allow_rotated_crs_drop_2126.py::test_rotated_optin_drops_crs_wkt` | `read/test_crs.py::test_populate_attrs_rotated_optin_drops_attr[crs_wkt]` | parametrized |
30+
| `test_allow_rotated_crs_drop_2126.py::test_plain_no_georef_keeps_crs` | `read/test_crs.py::test_populate_attrs_plain_no_georef_keeps_crs` | unchanged |
31+
| `test_allow_rotated_crs_drop_2126.py::test_axis_aligned_georef_keeps_crs_and_transform` | `read/test_crs.py::test_populate_attrs_axis_aligned_keeps_crs_and_transform` | renamed |
32+
| `test_allow_rotated_crs_drop_2126.py::test_open_geotiff_rotated_with_crs_drops_crs` | `read/test_crs.py::test_open_geotiff_rotated_with_crs_geokey_only_drops_crs[eager]` | parametrized; tifffile-written variant with Geographic-only GeoKey |
33+
| `test_allow_rotated_crs_drop_2126.py::test_open_geotiff_rotated_with_crs_dask_drops_crs` | `read/test_crs.py::test_open_geotiff_rotated_with_crs_geokey_only_drops_crs[dask]` | parametrized |
34+
35+
## `test_allow_rotated_no_crs_2122.py`
36+
37+
| Old file::test | New file::test_id | Notes |
38+
|---|---|---|
39+
| `test_allow_rotated_no_crs_2122.py::test_eager_rotated_read_drops_crs` | `read/test_crs.py::test_open_geotiff_rotated_with_crs_drops_crs[eager]` | parametrized; uses the hand-rolled writer with full `_GEO_KEYS_4326` block |
40+
| `test_allow_rotated_no_crs_2122.py::test_dask_rotated_read_drops_crs` | `read/test_crs.py::test_open_geotiff_rotated_with_crs_drops_crs[dask]` | parametrized |
41+
| `test_allow_rotated_no_crs_2122.py::test_cupy_rotated_read_drops_crs` | `read/test_crs.py::test_open_geotiff_rotated_with_crs_drops_crs_gpu[eager]` | parametrized; `@requires_gpu` |
42+
| `test_allow_rotated_no_crs_2122.py::test_dask_cupy_rotated_read_drops_crs` | `read/test_crs.py::test_open_geotiff_rotated_with_crs_drops_crs_gpu[dask]` | parametrized; `@requires_gpu` |
43+
| `test_allow_rotated_no_crs_2122.py::test_axis_aligned_read_still_emits_crs` | `read/test_crs.py::test_open_geotiff_axis_aligned_with_crs_keeps_crs` | renamed |
44+
| `test_allow_rotated_no_crs_2122.py::test_vrt_eager_rotated_read_drops_crs` | `read/test_crs.py::test_vrt_rotated_with_crs_drops_crs[eager]` | parametrized |
45+
| `test_allow_rotated_no_crs_2122.py::test_vrt_chunked_rotated_read_drops_crs` | `read/test_crs.py::test_vrt_rotated_with_crs_drops_crs[dask]` | parametrized |
46+
| `test_allow_rotated_no_crs_2122.py::test_vrt_axis_aligned_still_emits_crs` | `read/test_crs.py::test_vrt_axis_aligned_with_crs_keeps_crs` | renamed |
47+
48+
## Coverage delta
49+
50+
* No coverage was dropped except the two HTTP cases from 2115, which are
51+
superseded by the more thorough HTTP+dask coverage in
52+
`test_http_dask_allow_rotated_2130.py` (PR 9). Local-file rotated
53+
raise and pixel-grid read are still pinned by the eager+dask
54+
parametrizations.
55+
* The Geographic-only GeoKey path (tifffile writer, 2126's
56+
``_write_rotated_tiff_with_geokeys``) and the full
57+
`_GEO_KEYS_4326`-block path (hand-rolled writer, 2122's
58+
``_write_rotated_tiff_with_crs``) are both kept as distinct
59+
scenarios; each exercises a different GeoKey-parser branch.
60+
61+
## Pre-merge action
62+
63+
Delete this file (`CLUSTER_AUDIT_PR3.md`) on the final commit before the
64+
PR is approved. The audit is a review artifact, not a documentation
65+
deliverable; the git history and the PR description retain the trail.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Read-path tests for the GeoTIFF module."""

0 commit comments

Comments
 (0)