(feat): new zarr dtypes
- [x] Accounting for https://github.com/zarr-developers/zarr-python/pull/2874
- [x] Tests added
- [ ] Release note added (or unnecessary)
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 85.59%. Comparing base (e20456a) to head (bbf7507).
:warning: Report is 49 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1995 +/- ##
==========================================
- Coverage 87.59% 85.59% -2.00%
==========================================
Files 46 46
Lines 7062 7054 -8
==========================================
- Hits 6186 6038 -148
- Misses 876 1016 +140
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/anndata/_core/xarray.py | 98.42% <100.00%> (ø) |
|
| src/anndata/_io/specs/methods.py | 90.69% <100.00%> (-0.02%) |
:arrow_down: |
| src/anndata/_io/zarr.py | 83.90% <ø> (-0.88%) |
:arrow_down: |
| src/anndata/compat/__init__.py | 80.73% <100.00%> (ø) |
|
| src/anndata/experimental/backed/_lazy_arrays.py | 94.23% <ø> (-0.06%) |
:arrow_down: |
| src/anndata/tests/helpers.py | 83.20% <100.00%> (-10.56%) |
:arrow_down: |
Seems like zarr.dtype.VariableLengthUTF8 wraps numpy’s new string dtype if available.
Hmm, I hadn't thought of it that way tbh, it was just "the new zarr API for dtypes" and this happens to be the only place we use it. I will give more context next time, apologies!
Makes sense! I just wondered what that dtype is and found that it’s basically just our previous match statement, but done by zarr now.
More info here! https://zarr.readthedocs.io/en/stable/api/zarr/dtype/index.html This PR is basically what I held up the anndata release over - the new dtype stuff was big enough that I wanted a clean break. But it is a very rich feature set! I haven't had time to dig into the new possibilities yet, but looks promising