Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use zarrita rather than zarr.js #1680

Closed
wants to merge 14 commits into from
Closed

Use zarrita rather than zarr.js #1680

wants to merge 14 commits into from

Conversation

keller-mark
Copy link
Member

@keller-mark keller-mark commented Sep 11, 2023

Fixes #

Background

  • SpatialData examples contain arrays of <i8 integers. ZarrJS does not support these Support BigInt64Array gzuidhof/zarr.js#143
  • Zarr v3 is coming and zarrita supports this
  • ZarrJS has a large bundle size, in part due to support for writing, which we do not need. Zarrita is tree-shakeable.
  • Zarrita supports decoding string arrays stored as vlen-utf8, so we can get rid of that code here
  • ZarrJS does not support unicode string arrays with dtype like <U7
  • ZarrJS does not support zero-dimensional array access (e.g., scalar value stored as Zarr with shape [])

Change List

TODO

@github-actions
Copy link
Contributor

github-actions bot commented Sep 11, 2023

Size Change: +874 kB (+8%) 🔍

Total Size: 12.5 MB

Filename Size Change
./packages/main/prod/dist/hglib-********.js 4.33 MB -2.76 kB (0%)
./packages/main/prod/dist/blosc-********.js 448 kB +448 kB (new file) 🆕
./packages/main/prod/dist/lz4-********.js 51.1 kB +51.1 kB (new file) 🆕
./packages/main/prod/dist/pako.esm-856454b6-********.js 69 kB +69 kB (new file) 🆕
./packages/main/prod/dist/zstd-********.js 308 kB +308 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./packages/main/prod/dist/deflate-********.js 243 B 0 B
./packages/main/prod/dist/index-********.js 7.15 MB -352 B (0%)
./packages/main/prod/dist/index.min.js 726 B 0 B
./packages/main/prod/dist/jpeg-********.js 15.3 kB 0 B
./packages/main/prod/dist/lerc-********.js 47.2 kB -18 B (0%)
./packages/main/prod/dist/lzw-********.js 2.1 kB 0 B
./packages/main/prod/dist/packbits-********.js 576 B 0 B
./packages/main/prod/dist/pako.esm-********.js 68.6 kB 0 B
./packages/main/prod/dist/raw-********.js 168 B 0 B
./packages/main/prod/dist/webimage-********.js 836 B -36 B (-4%)
./packages/main/prod/dist/gzip-********.js 517 B +517 B (new file) 🆕
./packages/main/prod/dist/zlib-********.js 523 B +523 B (new file) 🆕

compressed-size-action

@github-actions
Copy link
Contributor

github-actions bot commented Sep 11, 2023

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 75.58% 10356 / 13701
🔵 Statements 75.58% 10356 / 13701
🔵 Functions 62.6% 288 / 460
🔵 Branches 79.05% 951 / 1203
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/file-types/zarr/src/AnnDataSource.js 80.89% 77.77% 75% 80.89% 23-24, 38-41, 48-49, 51-52, 80-84, 100-104, 145-146, 157-158, 168-177
packages/file-types/zarr/src/ZarrDataSource.js 100% 50% 100% 100%
packages/file-types/zarr/src/anndata-loaders/ObsFeatureMatrixAnndataLoader.js 75.45% 84.21% 73.68% 75.45% 15-27, 49-50, 53, 68-72, 112-113, 138-139, 180-181, 214-215, 249-250, 273-296, 340-350, 353-366, 369-382
Generated in workflow #3220

@keller-mark keller-mark marked this pull request as ready for review September 12, 2023 00:08
@keller-mark keller-mark mentioned this pull request Sep 12, 2023
12 tasks
@manzt
Copy link
Member

manzt commented Sep 17, 2023

Cool! Want to chat this week about the zarrita TODOs? I can take a stab at improving these

@keller-mark keller-mark mentioned this pull request Sep 17, 2023
12 tasks
@keller-mark keller-mark marked this pull request as draft September 17, 2023 16:00
@keller-mark
Copy link
Member Author

@manzt yes! Will follow up on slack

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.

None yet

2 participants