Skip to content

Add BitRound compatibility fixtures and registry-restored decoding tests - #875

Open
LJimmy007 wants to merge 1 commit into
zarr-developers:mainfrom
LJimmy007:test/bitround-compat-fixtures
Open

LJimmy007 wants to merge 1 commit into
zarr-developers:mainfrom
LJimmy007:test/bitround-compat-fixtures

Conversation

@LJimmy007

Copy link
Copy Markdown

Related to #348; this advances only the BitRound subtask.

BitRound's current tests exercise data produced by the current encoder. Add small
fixed compatibility data for float32/float64 and two explicit keepbits values,
then decode it using the instance returned by get_codec after a JSON roundtrip.
Assert the restored type/configuration separately from dtype, shape and exact
rounded values, since decoding does not depend on keepbits.

The four binary fixtures total 96 bytes and were established from commit
1f83681cf310ac9aac8041ed6ff4a5dcc42a7aad. Their README records the input,
configuration, byte order, generation procedure and independently calculated
expectations. Tests only read these files and fail when required data is absent.
This adds compatibility coverage without changing production behavior, the
shared compatibility helper, or requirements on future encoder output.

Validation on Windows x86_64, Python 3.13.5, NumPy 2.5.4, with this checkout and
its C/Cython extensions built through Meson:

  • Focused BitRound/registry/compatibility tests: 34 passed.
  • Full suite including Zarr 3.1.6: 874 passed, 21 skipped, 1 expected failure.
    pytest -p no:zarr produces the same result while avoiding Zarr's pytest plugin
    importing Numcodecs before coverage starts. BitRound and registry coverage is
    100%; total Python coverage is 99.34% (alternate CRC32C backend branches remain).
  • All applicable configured pre-commit hooks pass.
  • HTML documentation builds with three warnings also present in an unmodified
    baseline copy; no new documentation warnings.
  • Local fault probes confirm missing config/data, wrong restored keepbits, and
    wrong decoded dtype/shape/values fail at the intended checks. After removing
    substitutions, all four cases pass with encoding forbidden and fixture hashes
    unchanged. These probes are outside the proposed patch.

The upstream cross-platform CI matrix has not been run for this patch.

Related to zarr-developers#348. Verify fixed float32/float64 data with registry-restored JSON configurations.
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1f83681) to head (8dd3a6e).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #875   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines          905       905           
=========================================
  Hits           905       905           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LJimmy007

Copy link
Copy Markdown
Author

A quick update: the upstream Tests, Wheels, and i386 workflows have now passed for this PR. This is limited to BitRound compatibility fixtures and registry-restored decoding tests, with no production behavior changes.

Could a maintainer take a look when convenient? I'd appreciate feedback on whether this coverage is a suitable step toward #348. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants