Skip to content
New issue

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

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

Already on GitHub? # to your account

Add encoding type and version to write_zarr #891

Closed
wants to merge 2 commits into from

Conversation

Zethson
Copy link
Member

@Zethson Zethson commented Feb 28, 2025

Fixes #890

I added a new test script because I am not sure whether these tests should live in io/test_readwrite.py because the original writing code is in core.

@Zethson
Copy link
Member Author

Zethson commented Feb 28, 2025

tests/conftest.py:25: in <module>
    from spatialdata._core._deepcopy import deepcopy
src/spatialdata/__init__.py:58: in <module>
    from spatialdata import dataloader, datasets, models, transformations
src/spatialdata/datasets.py:20: in <module>
    from spatialdata._core.operations.aggregate import aggregate
src/spatialdata/_core/operations/aggregate.py:19: in <module>
    from spatialdata._core.operations._utils import _parse_element
src/spatialdata/_core/operations/_utils.py:7: in <module>
    from spatialdata.models import SpatialElement, get_axes_names, get_spatial_axes
src/spatialdata/models/__init__.py:19: in <module>
    from spatialdata.models.models import (
src/spatialdata/models/models.py:17: in <module>
    from multiscale_spatial_image import to_multiscale
.venv/lib/python3.10/site-packages/multiscale_spatial_image/__init__.py:16: in <module>
    from .to_multiscale import Methods, to_multiscale, itk_image_to_multiscale
.venv/lib/python3.10/site-packages/multiscale_spatial_image/to_multiscale/__init__.py:1: in <module>
    from .to_multiscale import Methods, to_multiscale
.venv/lib/python3.10/site-packages/multiscale_spatial_image/to_multiscale/to_multiscale.py:4: in <module>
    from spatial_image import SpatialImage  # type: ignore
.venv/lib/python3.10/site-packages/spatial_image/__init__.py:14: in <module>
    from xarray_dataclasses import AsDataArray, Attr, Coordof, Data, Name
E   ImportError: cannot import name 'AsDataArray' from 'xarray_dataclasses' (/home/runner/work/spatialdata/spatialdata/.venv/lib/python3.10/site-packages/xarray_dataclasses/__init__.py)

in the CI. I guess this is unrelated?

Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.11%. Comparing base (6e259f0) to head (1c2af75).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #891   +/-   ##
=======================================
  Coverage   92.11%   92.11%           
=======================================
  Files          48       48           
  Lines        7429     7432    +3     
=======================================
+ Hits         6843     6846    +3     
  Misses        586      586           
Files with missing lines Coverage Δ
src/spatialdata/_core/spatialdata.py 91.48% <100.00%> (+0.02%) ⬆️

@Zethson
Copy link
Member Author

Zethson commented Feb 28, 2025

We want to avoid duplication for now so we are postponing this till zarr v3

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write zarr encoding type
1 participant