Skip to content

Consolidation cluster 1: codec (CPU) (long-tail epic #2424) #2425

Closed

Description

@brendancol

Follow-up to epic #2424 / #2390. Cluster 1 of 16, in fanout order. This issue is parallel-safe with the other 15 cluster issues; nothing depends on it landing first.

Likely 1-2 PRs depending on review size.

Scope

Fold the CPU-side codec tests into the unit/ cluster. The aim is one parametrised home for codec round-trips plus a thin home for codec-specific edge cases.

Files to consolidate (11)

  • xrspatial/geotiff/tests/test_jpeg.py
  • xrspatial/geotiff/tests/test_jpeg2000.py
  • xrspatial/geotiff/tests/test_lerc.py
  • xrspatial/geotiff/tests/test_lerc_max_z_error.py
  • xrspatial/geotiff/tests/test_lerc_valid_mask.py
  • xrspatial/geotiff/tests/test_lz4.py
  • xrspatial/geotiff/tests/test_lz4_compression_level_2026_05_11.py
  • xrspatial/geotiff/tests/test_miniswhite_nodata_1809.py
  • xrspatial/geotiff/tests/test_miniswhite_writer_roundtrip_1836.py
  • xrspatial/geotiff/tests/test_signed_miniswhite_rejected_2278.py
  • xrspatial/geotiff/tests/test_to_geotiff_allow_internal_only_jpeg_parity.py

Target

Extend xrspatial/geotiff/tests/unit/test_compression.py (already exists from epic #2390 PR 11) for codec round-trip cases. If the diff grows past roughly 1500 lines, split write-side round-trips into a sibling unit/test_codec_roundtrip.py.

Boundary

  • GPU codec paths (test_jpeg_gpu_1549.py, test_lerc_valid_mask_gpu.py, test_nvcomp_*, test_nvjpeg*) are out of scope. They belong to the GPU cluster issue.
  • Codec docstring / level tests (test_compression_docstring_1644.py, test_compression_level.py) are also in scope here; PR 11 of Epic: Consolidate the GeoTIFF test suite (354 files → ~50) #2390 left them at the top level.

Constraints (same across the epic)

  • Tests-only. No changes to xrspatial/geotiff/ source modules.
  • Markers from _helpers/markers.py; make_minimal_tiff from _helpers/tiff_builders.py.
  • Parametrise IDs descriptively (e.g. id="lerc-float32[max-z-error=1e-6]"). No issue numbers in test names or filenames.
  • CLUSTER_AUDIT_CODEC.md deleted on the pre-merge commit, not after merge.

Verification

pytest xrspatial/geotiff/tests/unit/test_compression.py -v
pytest xrspatial/geotiff/tests/ -x -q

File count drops by 10 (11 deleted, 1 added if extending existing file) or 9 (if splitting into a new sibling).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions