Skip to content

test_write_vs_to_geotiff_byte_parity_uint8[lz4] fails after experimental-codec gate (#2137) #2268

@brendancol

Description

@brendancol

Describe the bug

xrspatial/geotiff/tests/test_lowlevel_write_pushdown_2138.py::test_write_vs_to_geotiff_byte_parity_uint8[lz4] fails with ValueError: compression='lz4' is experimental from the writer's experimental-codec gate added in #2137.

The parity test's _PARITY_CODECS tuple still lists lz4, but lz4 was reclassified as experimental in _EXPERIMENTAL_CODECS (in _attrs.py, derived from SUPPORTED_FEATURES['codec.lz4'] = 'experimental'). The test calls _write(...) and to_geotiff(...) without allow_experimental_codecs=True, so both raise at the gate before producing any output.

To reproduce

pytest xrspatial/geotiff/tests/test_lowlevel_write_pushdown_2138.py::test_write_vs_to_geotiff_byte_parity_uint8 -v

26 of 27 cases pass. [lz4] fails:

ValueError: compression='lz4' is experimental: cross-backend numerical parity
is not claimed and reader support across GDAL versions is uneven.
Pass allow_experimental_codecs=True to opt in, or use 'deflate', 'zstd',
or 'lzw' for a stable lossless codec (issue #2137).

Expected behavior

The full file runs green.

Fix

Drop lz4 from _PARITY_CODECS. The other experimental codecs (lerc, jpeg2000, j2k) are already excluded from the parity sweep, and the docstring above the tuple already notes the sweep targets the lossless codec set that direct callers reach for first. Removing lz4 keeps the list consistent with the experimental-codec gate.

Additional context

Surfaced while running the test file after the #2137 gate landed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QA/QCbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions