spatialdata 0.7.1__tar.gz → 0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.gitignore +1 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/PKG-INFO +2 -2
- {spatialdata-0.7.1 → spatialdata-0.7.2}/_version.py +2 -2
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/conf.py +2 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/contributing.md +16 -5
- {spatialdata-0.7.1 → spatialdata-0.7.2}/pyproject.toml +1 -1
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/_deepcopy.py +1 -1
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/_elements.py +7 -7
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/operations/rasterize.py +1 -1
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/operations/transform.py +2 -2
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/spatialdata.py +11 -15
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_io/io_table.py +1 -1
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_utils.py +1 -1
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/models/_utils.py +1 -1
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/models/models.py +137 -140
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/io/test_multi_table.py +1 -1
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/models/test_models.py +46 -15
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.bumpversion.cfg +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.editorconfig +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.github/codecov.yml +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.github/release.yml +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.github/workflows/build_image.yml +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.github/workflows/release.yaml +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.github/workflows/test.yaml +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.gitmodules +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.mypy.ini +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.pre-commit-config.yaml +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/.readthedocs.yaml +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/CHANGELOG.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/Dockerfile +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/LICENSE +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/README.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/asv.conf.json +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/benchmarks/README.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/benchmarks/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/benchmarks/spatialdata_benchmark.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/benchmarks/utils.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/Makefile +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/_static/.gitkeep +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/_static/css/custom.css +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/_static/img/spatialdata_horizontal.png +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/_templates/.gitkeep +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/_templates/autosummary/base.rst +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/_templates/autosummary/class.rst +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/_templates/autosummary/function.rst +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/SpatialData.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/data_formats.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/dataloader.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/datasets.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/io.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/models.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/models_utils.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/operations.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/testing.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/transformations.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api/transformations_utils.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/api.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/changelog.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/design_doc.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/extensions/typed_returns.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/glossary.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/index.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/installation.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/references.bib +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/references.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/docs/user_guide.md +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/__main__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_bridges/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/_utils.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/centroids.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/concatenate.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/data_extent.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/operations/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/operations/_utils.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/operations/aggregate.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/operations/map.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/operations/rasterize_bins.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/operations/vectorize.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/query/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/query/_utils.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/query/relational_query.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/query/spatial_query.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_core/validation.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_docs.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_io/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_io/_utils.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_io/format.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_io/io_points.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_io/io_raster.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_io/io_shapes.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_io/io_zarr.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_logging.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/_types.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/config.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/dataloader/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/dataloader/datasets.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/datasets.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/io/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/models/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/models/_accessor.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/testing.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/transformations/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/transformations/_utils.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/transformations/ngff/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/transformations/ngff/_utils.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/transformations/ngff/ngff_coordinate_system.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/transformations/ngff/ngff_transformations.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/transformations/operations.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/src/spatialdata/transformations/transformations.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/conftest.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/operations/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/operations/test_aggregations.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/operations/test_map.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/operations/test_rasterize.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/operations/test_rasterize_bins.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/operations/test_spatialdata_operations.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/operations/test_transform.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/operations/test_vectorize.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/query/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/query/test_relational_query.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/query/test_relational_query_match_sdata_to_table.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/query/test_spatial_query.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/test_centroids.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/test_data_extent.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/test_deepcopy.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/test_get_attrs.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/core/test_validation.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/data/multipolygon.json +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/data/points.json +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/data/polygon.json +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/dataloader/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/dataloader/test_datasets.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/datasets/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/datasets/test_datasets.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/io/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/io/test_attrs_io.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/io/test_format.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/io/test_metadata.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/io/test_partial_read.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/io/test_pyramids_performance.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/io/test_readwrite.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/io/test_utils.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/models/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/models/test_accessor.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/transformations/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/transformations/ngff/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/transformations/ngff/conftest.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/transformations/ngff/test_ngff_coordinate_system.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/transformations/ngff/test_ngff_transformations.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/transformations/test_transformations.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/transformations/test_transformations_utils.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/utils/__init__.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/utils/test_element_utils.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/utils/test_sanitize.py +0 -0
- {spatialdata-0.7.1 → spatialdata-0.7.2}/tests/utils/test_testing.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spatialdata
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Spatial data format.
|
|
5
5
|
Project-URL: Documentation, https://spatialdata.scverse.org/en/latest
|
|
6
6
|
Project-URL: Source, https://github.com/scverse/spatialdata.git
|
|
@@ -44,6 +44,7 @@ Requires-Dist: click
|
|
|
44
44
|
Requires-Dist: dask-image
|
|
45
45
|
Requires-Dist: dask<2026.1.2,>=2025.2.0
|
|
46
46
|
Requires-Dist: datashader
|
|
47
|
+
Requires-Dist: distributed<2026.1.2
|
|
47
48
|
Requires-Dist: fsspec[http,s3]
|
|
48
49
|
Requires-Dist: geopandas>=0.14
|
|
49
50
|
Requires-Dist: multiscale-spatial-image==2.0.3
|
|
@@ -62,7 +63,6 @@ Requires-Dist: shapely>=2.0.1
|
|
|
62
63
|
Requires-Dist: spatial-image>=1.2.3
|
|
63
64
|
Requires-Dist: typing-extensions>=4.8.0
|
|
64
65
|
Requires-Dist: universal-pathlib>=0.2.6
|
|
65
|
-
Requires-Dist: xarray-schema
|
|
66
66
|
Requires-Dist: xarray-spatial>=0.3.5
|
|
67
67
|
Requires-Dist: xarray>=2024.10.0
|
|
68
68
|
Requires-Dist: zarr>=3.0.0
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.7.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 7,
|
|
31
|
+
__version__ = version = '0.7.2'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 7, 2)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -12,6 +12,7 @@ from pathlib import Path
|
|
|
12
12
|
|
|
13
13
|
HERE = Path(__file__).parent
|
|
14
14
|
sys.path.insert(0, str(HERE / "extensions"))
|
|
15
|
+
sys.path.insert(0, str(HERE / "tutorials" / "notebooks" / "extensions"))
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
# -- Project information -----------------------------------------------------
|
|
@@ -57,6 +58,7 @@ extensions = [
|
|
|
57
58
|
"IPython.sphinxext.ipython_console_highlighting",
|
|
58
59
|
"sphinx_design",
|
|
59
60
|
*[p.stem for p in (HERE / "extensions").glob("*.py")],
|
|
61
|
+
*[p.stem for p in (HERE / "tutorials" / "notebooks" / "extensions").glob("*.py")],
|
|
60
62
|
]
|
|
61
63
|
|
|
62
64
|
autodoc_default_options = {
|
|
@@ -76,7 +76,7 @@ By including this additional information, the document now provides a more compr
|
|
|
76
76
|
|
|
77
77
|
### Integration testing
|
|
78
78
|
|
|
79
|
-
Cross-repo integration testing is available in the [spatialdata-integration-testing](https://github.com/scverse/spatialdata-integration-testing/) repo. Please follow the instructions in the Readme
|
|
79
|
+
Cross-repo integration testing is available in the [spatialdata-integration-testing](https://github.com/scverse/spatialdata-integration-testing/) repo. Please follow the instructions in the Readme (which also includes a video overview).
|
|
80
80
|
|
|
81
81
|
## Publishing a release
|
|
82
82
|
|
|
@@ -118,13 +118,24 @@ It's important that the tag for a pre-release follows this naming convention as
|
|
|
118
118
|
|
|
119
119
|
### Making a release on GitHub and publishing to PyPI
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
#### Recommended: Create the release via GitHub
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
- Go to the [Releases page on GitHub](https://github.com/scverse/spatialdata/releases) and press the “Draft a new release” button.
|
|
124
|
+
- Press “Choose a tag” and create a new tag.
|
|
125
|
+
- Please name the tag with the same string you intend for the release, including the `v` prefix.
|
|
126
|
+
- Alternatively, go to the [Tags page on GitHub](https://github.com/scverse/spatialdata/tags), select the latest tag, and press “Create release from tag”.
|
|
127
|
+
- Please name the release with the same string used for the tag (including the `v` prefix).
|
|
128
|
+
- Both approaches lead to the same page and view. From there:
|
|
129
|
+
- Specify whether the release is a pre-release and whether it should be set as the latest release (use the checkboxes accordingly).
|
|
130
|
+
- Fill in the release notes (explained in the next section).
|
|
131
|
+
- Press “Publish release” to make the release available on GitHub.
|
|
132
|
+
- A [GitHub Action](https://github.com/scverse/spatialdata/blob/main/.github/workflows/release.yaml) will automatically build the package and [upload it to PyPI](https://pypi.org/project/spatialdata/#history).
|
|
133
|
+
- The action may fail; check the [workflow status badge in the README](https://github.com/scverse/spatialdata/actions/workflows/release.yaml).
|
|
124
134
|
|
|
125
|
-
|
|
135
|
+
#### Not recommended: Manual tag-first workflow
|
|
126
136
|
|
|
127
|
-
|
|
137
|
+
- If you already tagged and pushed a commit as explained above and want to create a release from that tag, you can go to the [Tags page on GitHub](https://github.com/scverse/spatialdata/tags), select the latest tag, and press “Create release from tag”.
|
|
138
|
+
- Please name the release with the same string used for the tag (including the `v` prefix).
|
|
128
139
|
|
|
129
140
|
#### Writing release notes
|
|
130
141
|
|
|
@@ -27,6 +27,7 @@ dependencies = [
|
|
|
27
27
|
"click",
|
|
28
28
|
"dask-image",
|
|
29
29
|
"dask>=2025.2.0,<2026.1.2",
|
|
30
|
+
"distributed<2026.1.2",
|
|
30
31
|
"datashader",
|
|
31
32
|
"fsspec[s3,http]",
|
|
32
33
|
"geopandas>=0.14",
|
|
@@ -47,7 +48,6 @@ dependencies = [
|
|
|
47
48
|
"typing_extensions>=4.8.0",
|
|
48
49
|
"universal_pathlib>=0.2.6",
|
|
49
50
|
"xarray>=2024.10.0",
|
|
50
|
-
"xarray-schema",
|
|
51
51
|
"xarray-spatial>=0.3.5",
|
|
52
52
|
"zarr>=3.0.0",
|
|
53
53
|
]
|
|
@@ -79,7 +79,7 @@ def _(element: DataTree) -> DataTree:
|
|
|
79
79
|
msi[key][variable].data = from_array(msi[key][variable].data)
|
|
80
80
|
element[key][variable].data = from_array(element[key][variable].data)
|
|
81
81
|
assert model in [Image2DModel, Image3DModel, Labels2DModel, Labels3DModel]
|
|
82
|
-
model
|
|
82
|
+
model.validate(msi)
|
|
83
83
|
return msi
|
|
84
84
|
|
|
85
85
|
|
|
@@ -72,10 +72,10 @@ class Images(Elements[DataArray | DataTree]):
|
|
|
72
72
|
raise TypeError(f"Unknown element type with schema: {schema!r}.")
|
|
73
73
|
ndim = len(get_axes_names(value))
|
|
74
74
|
if ndim == 3:
|
|
75
|
-
Image2DModel
|
|
75
|
+
Image2DModel.validate(value)
|
|
76
76
|
super().__setitem__(key, value)
|
|
77
77
|
elif ndim == 4:
|
|
78
|
-
Image3DModel
|
|
78
|
+
Image3DModel.validate(value)
|
|
79
79
|
super().__setitem__(key, value)
|
|
80
80
|
else:
|
|
81
81
|
NotImplementedError("TODO: implement for ndim > 4.")
|
|
@@ -89,10 +89,10 @@ class Labels(Elements[DataArray | DataTree]):
|
|
|
89
89
|
raise TypeError(f"Unknown element type with schema: {schema!r}.")
|
|
90
90
|
ndim = len(get_axes_names(value))
|
|
91
91
|
if ndim == 2:
|
|
92
|
-
Labels2DModel
|
|
92
|
+
Labels2DModel.validate(value)
|
|
93
93
|
super().__setitem__(key, value)
|
|
94
94
|
elif ndim == 3:
|
|
95
|
-
Labels3DModel
|
|
95
|
+
Labels3DModel.validate(value)
|
|
96
96
|
super().__setitem__(key, value)
|
|
97
97
|
else:
|
|
98
98
|
NotImplementedError("TODO: implement for ndim > 3.")
|
|
@@ -104,7 +104,7 @@ class Shapes(Elements[GeoDataFrame]):
|
|
|
104
104
|
schema = get_model(value)
|
|
105
105
|
if schema != ShapesModel:
|
|
106
106
|
raise TypeError(f"Unknown element type with schema: {schema!r}.")
|
|
107
|
-
ShapesModel
|
|
107
|
+
ShapesModel.validate(value)
|
|
108
108
|
super().__setitem__(key, value)
|
|
109
109
|
|
|
110
110
|
|
|
@@ -114,7 +114,7 @@ class Points(Elements[DaskDataFrame]):
|
|
|
114
114
|
schema = get_model(value)
|
|
115
115
|
if schema != PointsModel:
|
|
116
116
|
raise TypeError(f"Unknown element type with schema: {schema!r}.")
|
|
117
|
-
PointsModel
|
|
117
|
+
PointsModel.validate(value)
|
|
118
118
|
super().__setitem__(key, value)
|
|
119
119
|
|
|
120
120
|
|
|
@@ -124,5 +124,5 @@ class Tables(Elements[AnnData]):
|
|
|
124
124
|
schema = get_model(value)
|
|
125
125
|
if schema != TableModel:
|
|
126
126
|
raise TypeError(f"Unknown element type with schema: {schema!r}.")
|
|
127
|
-
TableModel
|
|
127
|
+
TableModel.validate(value)
|
|
128
128
|
super().__setitem__(key, value)
|
|
@@ -602,7 +602,7 @@ def rasterize_images_labels(
|
|
|
602
602
|
set_transformation(transformed_data, sequence, target_coordinate_system)
|
|
603
603
|
|
|
604
604
|
transformed_data = compute_coordinates(transformed_data)
|
|
605
|
-
schema
|
|
605
|
+
schema.validate(transformed_data)
|
|
606
606
|
return transformed_data
|
|
607
607
|
|
|
608
608
|
|
|
@@ -333,7 +333,7 @@ def _(
|
|
|
333
333
|
to_coordinate_system=to_coordinate_system,
|
|
334
334
|
)
|
|
335
335
|
transformed_data = compute_coordinates(transformed_data)
|
|
336
|
-
schema
|
|
336
|
+
schema.validate(transformed_data)
|
|
337
337
|
return transformed_data
|
|
338
338
|
|
|
339
339
|
|
|
@@ -419,7 +419,7 @@ def _(
|
|
|
419
419
|
to_coordinate_system=to_coordinate_system,
|
|
420
420
|
)
|
|
421
421
|
transformed_data = compute_coordinates(transformed_data)
|
|
422
|
-
schema
|
|
422
|
+
schema.validate(transformed_data)
|
|
423
423
|
return transformed_data
|
|
424
424
|
|
|
425
425
|
|
|
@@ -57,15 +57,6 @@ if TYPE_CHECKING:
|
|
|
57
57
|
SpatialDataFormatType,
|
|
58
58
|
)
|
|
59
59
|
|
|
60
|
-
# schema for elements
|
|
61
|
-
Label2D_s = Labels2DModel()
|
|
62
|
-
Label3D_s = Labels3DModel()
|
|
63
|
-
Image2D_s = Image2DModel()
|
|
64
|
-
Image3D_s = Image3DModel()
|
|
65
|
-
Shape_s = ShapesModel()
|
|
66
|
-
Point_s = PointsModel()
|
|
67
|
-
Table_s = TableModel()
|
|
68
|
-
|
|
69
60
|
|
|
70
61
|
class SpatialData:
|
|
71
62
|
"""
|
|
@@ -199,7 +190,7 @@ class SpatialData:
|
|
|
199
190
|
UserWarning
|
|
200
191
|
The dtypes of the instance key column in the table and the annotation target do not match.
|
|
201
192
|
"""
|
|
202
|
-
TableModel
|
|
193
|
+
TableModel.validate(table)
|
|
203
194
|
if TableModel.ATTRS_KEY in table.uns:
|
|
204
195
|
region, _, instance_key = get_table_keys(table)
|
|
205
196
|
region = region if isinstance(region, list) else [region]
|
|
@@ -349,8 +340,13 @@ class SpatialData:
|
|
|
349
340
|
ValueError
|
|
350
341
|
If `instance_key` is not present in the `table.obs` columns.
|
|
351
342
|
"""
|
|
352
|
-
TableModel
|
|
353
|
-
|
|
343
|
+
old_attrs = table.uns.get(TableModel.ATTRS_KEY)
|
|
344
|
+
# _validate_set_region_key and _validate_set_instance_key will raise an error if table.uns[ATTRS_KEY] is None,
|
|
345
|
+
# so let's initialize it here. Below it will be replaced with the actual metadata.
|
|
346
|
+
if old_attrs is None:
|
|
347
|
+
table.uns[TableModel.ATTRS_KEY] = {}
|
|
348
|
+
TableModel._validate_set_region_key(table, region_key)
|
|
349
|
+
TableModel._validate_set_instance_key(table, instance_key)
|
|
354
350
|
attrs = {
|
|
355
351
|
TableModel.REGION_KEY: region,
|
|
356
352
|
TableModel.REGION_KEY_KEY: region_key,
|
|
@@ -393,8 +389,8 @@ class SpatialData:
|
|
|
393
389
|
attrs = table.uns[TableModel.ATTRS_KEY]
|
|
394
390
|
table_region_key = region_key if region_key else attrs.get(TableModel.REGION_KEY_KEY)
|
|
395
391
|
|
|
396
|
-
TableModel
|
|
397
|
-
TableModel
|
|
392
|
+
TableModel._validate_set_region_key(table, region_key)
|
|
393
|
+
TableModel._validate_set_instance_key(table, instance_key)
|
|
398
394
|
check_target_region_column_symmetry(table, table_region_key, region)
|
|
399
395
|
attrs[TableModel.REGION_KEY] = region
|
|
400
396
|
|
|
@@ -1822,7 +1818,7 @@ class SpatialData:
|
|
|
1822
1818
|
self._shared_keys = self._shared_keys - set(self._tables.keys())
|
|
1823
1819
|
self._tables = Tables(shared_keys=self._shared_keys)
|
|
1824
1820
|
for k, v in tables.items():
|
|
1825
|
-
TableModel
|
|
1821
|
+
TableModel.validate(v)
|
|
1826
1822
|
self._tables[k] = v
|
|
1827
1823
|
|
|
1828
1824
|
@staticmethod
|
|
@@ -56,7 +56,7 @@ def write_table(
|
|
|
56
56
|
) -> None:
|
|
57
57
|
if TableModel.ATTRS_KEY in table.uns:
|
|
58
58
|
region, region_key, instance_key = get_table_keys(table)
|
|
59
|
-
TableModel
|
|
59
|
+
TableModel.validate(table)
|
|
60
60
|
else:
|
|
61
61
|
region, region_key, instance_key = (None, None, None)
|
|
62
62
|
|
|
@@ -308,7 +308,7 @@ def _error_message_add_element() -> None:
|
|
|
308
308
|
|
|
309
309
|
|
|
310
310
|
def _check_match_length_channels_c_dim(
|
|
311
|
-
data: DaskArray | DataArray | DataTree, c_coords: str | list[str], dims: tuple[str]
|
|
311
|
+
data: DaskArray | DataArray | DataTree, c_coords: str | list[str], dims: tuple[str, ...]
|
|
312
312
|
) -> list[str]:
|
|
313
313
|
"""
|
|
314
314
|
Check whether channel names `c_coords` are of equal length to the `c` dimension of the data.
|
|
@@ -401,7 +401,7 @@ def set_channel_names(element: DataArray | DataTree, channel_names: str | list[s
|
|
|
401
401
|
|
|
402
402
|
# get_model cannot be used due to circular import so get_axes_names is used instead
|
|
403
403
|
if model in [Image2DModel, Image3DModel]:
|
|
404
|
-
channel_names = _check_match_length_channels_c_dim(element, channel_names, model.dims
|
|
404
|
+
channel_names = _check_match_length_channels_c_dim(element, channel_names, model.dims) # type: ignore[union-attr]
|
|
405
405
|
if isinstance(element, DataArray):
|
|
406
406
|
element = element.assign_coords(c=channel_names)
|
|
407
407
|
else:
|