Drop lz4 from byte-parity sweep, gated as experimental (#2268)#2269
Merged
Conversation
`lz4` moved into `_EXPERIMENTAL_CODECS` via #2137, so direct callers must now pass `allow_experimental_codecs=True`. The parity sweep in `test_lowlevel_write_pushdown_2138.py` calls `_write` and `to_geotiff` without the opt-in and was failing at the gate. The other experimental codecs (`lerc`, `jpeg2000`, `j2k`) are already absent from `_PARITY_CODECS`. Removing `lz4` keeps the list consistent with the docstring's "stable lossless codec set" framing. Closes #2268.
brendancol
commented
May 21, 2026
Contributor
Author
brendancol
left a comment
There was a problem hiding this comment.
PR Review: Drop lz4 from byte-parity sweep, gated as experimental (#2268)
Blockers (must fix before merge)
- (none)
Suggestions (should fix, not blocking)
- (none)
Nits (optional improvements)
xrspatial/geotiff/tests/test_lowlevel_write_pushdown_2138.py:46-51: the_codec_available("lz4")branch is now dead code in this file. Nothing else in the module exercises lz4 after the parity-tuple change. You can drop the lz4 branch from_codec_availableor leave it as a generic skip-probe for future experimental-opt-in tests. Either is defensible.
What looks good
- Diff is exactly what the issue calls for: one tuple entry removed, with a comment explaining the experimental-codec gate cited to issue #2137.
- The exclusion matches the existing treatment of
lerc,jpeg2000, andj2k, which were never in the parity tuple. The list is now internally consistent. - The remaining 26 parametrizations are stable codecs that round-trip losslessly, so the parity contract the test was written to defend is preserved.
- No production code touched; no test downgraded.
Checklist
- Algorithm matches reference/paper -- n/a, test-only change
- All implemented backends produce consistent results -- n/a
- NaN handling is correct -- n/a
- Edge cases are covered by tests -- existing coverage preserved
- Dask chunk boundaries handled correctly -- n/a
- No premature materialization or unnecessary copies -- n/a
- Benchmark exists or is not needed -- not applicable
- README feature matrix updated (if applicable) -- not applicable
- Docstrings present and accurate -- comment updated to cite #2137 gate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xrspatial/geotiff/tests/test_lowlevel_write_pushdown_2138.py::test_write_vs_to_geotiff_byte_parity_uint8[lz4]was failing because_write/to_geotiffnow rejectlz4at the experimental-codec gate from geotiff: tier the public surface; mark experimental codecs/features opt-in #2137 unless the caller passesallow_experimental_codecs=True.lz4from_PARITY_CODECS. The other experimental codecs (lerc,jpeg2000,j2k) were never in the tuple, so the result matches the docstring's "stable lossless codec set" framing.Closes #2268.
Test plan
pytest xrspatial/geotiff/tests/test_lowlevel_write_pushdown_2138.py -v-- 26 passed (was 26 passed, 1 failed before the change)