Testing
Single tests:
What holds what
- Python (
tests/test_*.py): codebooks, modulo-256 residuals, the container writer’s bytes and the bundle metadata validator, the manifest and pointer contracts, every source’s crop fixture through both encoders, the Zarr store writer and reader, the STAC documents and the point products against committed goldens. A source test builds what production publishes, the shared stores, and reads its bundles back out of them (tests._support.stored_bundle); a test that has to read a.xueopens it with the wheel’s decoder (xue.Bundle), the only container reader on the Python side. - Encoder parity:
tests/test_native.pyand every source test compare every artifact of one build through thexuepywheel against the reference pipeline, byte for byte: the shared stores, the manifest and the pointer. One case,NativeContainerParityTests, builds with the container too (--xue) and holds the.xuebytes of both encoders to each other.tests/test_assemble.pyholds a split build and a top-up identical to a whole one. - Rust:
rust/xue/tests/golden.rsdecodes the containerstests/prepare_bin_fixture.pywrites to the codes they were written from (read back out of the shared store by the NumPy reader), plus the container rejection paths and mutation fuzzing. - Registry snapshots (
rust/xue/registry.json, the shell’sweb/src/data/registry.ts) hold the three implementations to one set of ids, identities and codebooks;tests/test_registry.pyfails untilxue registry --output rust/xue/registry.json --shell web/src/data/registry.tsregenerates them. - Web (
tests/web/, Vitest): manifest validation, the Zarr reader (every frame and series identical to the wasm bundle reader), the variable table, URL state, discovery files. - Browser (
tests/e2e/, Playwright): synthetic fixtures built bytests/prepare_web_fixture.py(no network, no GDAL); download, streaming, playback, scrubbing, error recovery, and the store-only path.
Fixture provenance and regeneration are in
tests/fixtures/README.md. Goldens are
regenerated by the tests/prepare_*_golden.py scripts after a deliberate
change (the tc and sounding ones need bufr_dump).
CI
.github/workflows/test.yml runs the Python (3.14), Rust, web
and browser jobs on every push and pull request except prose-only changes
(**.md, docs/**). On release/** branches the Python job builds the
wheel from the tree instead of installing PyPI’s, since the encoders there
run ahead of the published wheel (see releasing). The Rust
job also runs make encoder-rust-test on every run: plain cargo test
leaves the encoder feature off, so the native encoder’s unit tests and
its golden run only there. The web job, after npm run build, holds the
viewer’s first-load JavaScript to web/tooling/size-budget.json
(node web/tooling/entrysize.ts; see
frontend).