add zarr tests#4228
Conversation
|
Zarr uses threads to do non-blocking disk I/O, so that can't work in WASM. I don't know if there is a way to configure it so that it doesn't use threads. |
|
What does work is: Can we expect any problems using zarr < 3? |
|
It looks like in v3 they use a thread pool executor internally, which was not the case in v2. |
|
zarr > 3 issue on pyodide pyodide/pyodide-recipes#227 |
|
recipe is pinned to <v3 https://github.com/pyodide/pyodide-recipes/blob/main/packages/zarr/meta.yaml @DerThorsten we should maybe do the same? |
|
Hi! You may refer to zarr-developers/zarr-python#1903 and pyodide/pyodide-recipes#584 for Zarr v3 support. |
|
nice, will have a look. |
2851381 to
054391e
Compare
|
Reset this branch to a fresh cut at zarr v3.
The reason for the xfails, and a question for you @DerThorsten: zarr 3's sync API seems to need JSPI. Without it every sync call blows up with: Pyodide flipped JSPI on by default in 0.28. Pyjs's CMakeLists doesn't seem to have Once JSPI is around the xfails should flip to XPASS on their own. |
054391e to
54d8981
Compare
Bumps zarr to 3.2.1 (was 3.1.3) and vendors the three downstream patches from pyodide-recipes PR emscripten-forge#584 (upstream zarr-python emscripten-forge#1903, still open): - src/zarr/_constants.py + core/sync.py: WASM branch that defers to the running event loop and raises a JSPI-explaining RuntimeError if synchronous blocking is not available - core/config.py: threading.max_workers=1 on WASM (single-threaded runtime) - storage/_local.py: WASM _safe_move that avoids os.link and does a manual dst.exists() check before os.rename Runtime deps: replace crc32c with google-crc32c (zarr 3.2 imports google_crc32c directly), drop asciitree (unused in v3). Tests: keep basic import; add three sync-API roundtrip tests marked xfail with reason "requires JSPI, not enabled in pyjs runtime" — they will start XPASSing once JSPI is available. Patch files carry the pyodide-recipes MPL-2.0 header and upstream attribution to Agriya Khetarpal / zarr-python#1903.
54d8981 to
18f7532
Compare
Basic zarr tests as in this PR are currrently failing. I'm opening to iterate on it and get it running. Currently this is based on the latests zarr.
Would be itnerest to hear feedback from @DerThorsten and @davidbrochart .