spatialdata 0.7.2__tar.gz → 0.7.3__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.2 → spatialdata-0.7.3}/.github/workflows/release.yaml +2 -2
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.github/workflows/test.yaml +17 -19
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.pre-commit-config.yaml +3 -3
- spatialdata-0.7.3/.readthedocs.yaml +23 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/PKG-INFO +3 -25
- spatialdata-0.7.3/_version.py +24 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/benchmarks/README.md +49 -11
- spatialdata-0.7.3/benchmarks/benchmark_imports.py +56 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/benchmarks/spatialdata_benchmark.py +0 -7
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/conf.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/extensions/typed_returns.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/index.md +17 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/pyproject.toml +23 -16
- spatialdata-0.7.3/src/spatialdata/__init__.py +224 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/__main__.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/_deepcopy.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/_elements.py +5 -22
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/_utils.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/centroids.py +24 -37
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/concatenate.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/data_extent.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/operations/aggregate.py +7 -2
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/operations/map.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/operations/rasterize.py +13 -2
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/operations/rasterize_bins.py +4 -2
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/operations/transform.py +11 -2
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/operations/vectorize.py +10 -3
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/query/_utils.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/query/relational_query.py +8 -6
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/query/spatial_query.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/validation.py +7 -4
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_docs.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_io/__init__.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_io/_utils.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_io/format.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_io/io_points.py +3 -1
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_io/io_raster.py +147 -28
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_io/io_shapes.py +3 -1
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_io/io_table.py +3 -1
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_io/io_zarr.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_logging.py +3 -1
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_types.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_utils.py +15 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/config.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/dataloader/datasets.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/datasets.py +61 -28
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/io/__init__.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/models/__init__.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/models/_accessor.py +3 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/models/_utils.py +2 -1
- spatialdata-0.7.3/src/spatialdata/models/chunks_utils.py +62 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/models/models.py +77 -44
- spatialdata-0.7.3/src/spatialdata/models/pyramids_utils.py +124 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/testing.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/transformations/__init__.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/transformations/ngff/_utils.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/transformations/ngff/ngff_transformations.py +9 -7
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/transformations/operations.py +8 -2
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/conftest.py +97 -22
- spatialdata-0.7.3/tests/core/operations/conftest.py +1 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/operations/test_aggregations.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/operations/test_map.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/operations/test_rasterize.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/operations/test_rasterize_bins.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/operations/test_spatialdata_operations.py +16 -13
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/operations/test_transform.py +44 -2
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/operations/test_vectorize.py +27 -22
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/query/test_relational_query.py +4 -2
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/query/test_relational_query_match_sdata_to_table.py +11 -8
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/query/test_spatial_query.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/test_centroids.py +3 -1
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/test_data_extent.py +15 -9
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/test_deepcopy.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/test_get_attrs.py +7 -9
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/test_validation.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/dataloader/__init__.py +2 -0
- spatialdata-0.7.3/tests/dataloader/conftest.py +1 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/dataloader/test_datasets.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/datasets/test_datasets.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/io/test_attrs_io.py +4 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/io/test_format.py +4 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/io/test_metadata.py +7 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/io/test_multi_table.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/io/test_partial_read.py +57 -35
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/io/test_pyramids_performance.py +30 -3
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/io/test_readwrite.py +182 -27
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/io/test_utils.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/models/test_accessor.py +11 -0
- spatialdata-0.7.3/tests/models/test_chunks_utils.py +47 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/models/test_models.py +72 -11
- spatialdata-0.7.3/tests/models/test_pyramids_utils.py +59 -0
- spatialdata-0.7.3/tests/test_init.py +25 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/transformations/ngff/conftest.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/transformations/ngff/test_ngff_coordinate_system.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/transformations/ngff/test_ngff_transformations.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/transformations/test_transformations.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/transformations/test_transformations_utils.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/utils/test_element_utils.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/utils/test_sanitize.py +2 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/utils/test_testing.py +2 -0
- spatialdata-0.7.2/.readthedocs.yaml +0 -20
- spatialdata-0.7.2/_version.py +0 -34
- spatialdata-0.7.2/docs/_templates/.gitkeep +0 -0
- spatialdata-0.7.2/docs/_templates/autosummary/base.rst +0 -5
- spatialdata-0.7.2/docs/_templates/autosummary/class.rst +0 -61
- spatialdata-0.7.2/docs/_templates/autosummary/function.rst +0 -5
- spatialdata-0.7.2/src/spatialdata/__init__.py +0 -76
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.bumpversion.cfg +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.editorconfig +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.github/codecov.yml +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.github/release.yml +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.github/workflows/build_image.yml +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.gitignore +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.gitmodules +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/.mypy.ini +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/CHANGELOG.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/Dockerfile +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/LICENSE +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/README.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/asv.conf.json +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/benchmarks/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/benchmarks/utils.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/Makefile +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/_static/.gitkeep +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/_static/css/custom.css +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/_static/img/spatialdata_horizontal.png +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/SpatialData.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/data_formats.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/dataloader.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/datasets.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/io.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/models.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/models_utils.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/operations.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/testing.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/transformations.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api/transformations_utils.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/api.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/changelog.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/contributing.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/design_doc.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/glossary.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/installation.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/references.bib +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/references.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/docs/user_guide.md +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_bridges/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/operations/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/operations/_utils.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/query/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/_core/spatialdata.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/dataloader/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/transformations/_utils.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/transformations/ngff/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/transformations/ngff/ngff_coordinate_system.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/src/spatialdata/transformations/transformations.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/operations/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/core/query/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/data/multipolygon.json +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/data/points.json +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/data/polygon.json +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/datasets/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/io/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/models/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/transformations/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/transformations/ngff/__init__.py +0 -0
- {spatialdata-0.7.2 → spatialdata-0.7.3}/tests/utils/__init__.py +0 -0
|
@@ -9,9 +9,9 @@ jobs:
|
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
11
11
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
12
|
+
- uses: actions/checkout@v6
|
|
13
13
|
- name: Set up Python 3.12
|
|
14
|
-
uses: actions/setup-python@
|
|
14
|
+
uses: actions/setup-python@v6
|
|
15
15
|
with:
|
|
16
16
|
python-version: "3.12"
|
|
17
17
|
cache: pip
|
|
@@ -13,18 +13,18 @@ jobs:
|
|
|
13
13
|
runs-on: ${{ matrix.os }}
|
|
14
14
|
defaults:
|
|
15
15
|
run:
|
|
16
|
-
shell: bash
|
|
16
|
+
shell: bash # bash also on windows
|
|
17
17
|
|
|
18
18
|
strategy:
|
|
19
19
|
fail-fast: false
|
|
20
20
|
matrix:
|
|
21
21
|
include:
|
|
22
|
-
- {os: windows-latest, python: "3.11", dask-version: "2025.
|
|
23
|
-
- {os: windows-latest, python: "3.
|
|
24
|
-
- {os: ubuntu-latest, python: "3.11", dask-version: "latest"
|
|
25
|
-
- {os: ubuntu-latest, python: "3.
|
|
26
|
-
- {os: macos-latest, python: "3.11", dask-version: "latest"
|
|
27
|
-
- {os: macos-latest, python: "3.
|
|
22
|
+
- {os: windows-latest, python: "3.11", dask-version: "2025.12.0", name: "min dask"}
|
|
23
|
+
- {os: windows-latest, python: "3.14", dask-version: "latest"}
|
|
24
|
+
- {os: ubuntu-latest, python: "3.11", dask-version: "latest"}
|
|
25
|
+
- {os: ubuntu-latest, python: "3.14", dask-version: "latest"}
|
|
26
|
+
- {os: macos-latest, python: "3.11", dask-version: "latest"}
|
|
27
|
+
- {os: macos-latest, python: "3.14", prerelease: "allow", name: "prerelease"}
|
|
28
28
|
env:
|
|
29
29
|
OS: ${{ matrix.os }}
|
|
30
30
|
PYTHON: ${{ matrix.python }}
|
|
@@ -32,8 +32,8 @@ jobs:
|
|
|
32
32
|
PRERELEASE: ${{ matrix.prerelease }}
|
|
33
33
|
|
|
34
34
|
steps:
|
|
35
|
-
- uses: actions/checkout@
|
|
36
|
-
- uses: astral-sh/setup-uv@
|
|
35
|
+
- uses: actions/checkout@v6
|
|
36
|
+
- uses: astral-sh/setup-uv@v7
|
|
37
37
|
id: setup-uv
|
|
38
38
|
with:
|
|
39
39
|
version: "latest"
|
|
@@ -41,29 +41,27 @@ jobs:
|
|
|
41
41
|
- name: Install dependencies
|
|
42
42
|
run: |
|
|
43
43
|
if [[ "${PRERELEASE}" == "allow" ]]; then
|
|
44
|
-
uv
|
|
45
|
-
|
|
46
|
-
uv
|
|
47
|
-
uv pip install --prerelease allow pandas
|
|
48
|
-
else
|
|
49
|
-
uv sync --extra test
|
|
44
|
+
sed -i '' 's/requires-python.*//' pyproject.toml # otherwise uv complains that anndata requires python>=3.12 and we only do >=3.11 😱
|
|
45
|
+
uv add git+https://github.com/scverse/anndata.git
|
|
46
|
+
uv add pandas>=3.dev0
|
|
50
47
|
fi
|
|
51
48
|
if [[ -n "${DASK_VERSION}" ]]; then
|
|
52
49
|
if [[ "${DASK_VERSION}" == "latest" ]]; then
|
|
53
|
-
uv
|
|
50
|
+
uv add dask
|
|
54
51
|
else
|
|
55
|
-
uv
|
|
52
|
+
uv add dask==${DASK_VERSION}
|
|
56
53
|
fi
|
|
57
54
|
fi
|
|
55
|
+
uv sync --group=test
|
|
58
56
|
- name: Test
|
|
59
57
|
env:
|
|
60
58
|
MPLBACKEND: agg
|
|
61
59
|
PLATFORM: ${{ matrix.os }}
|
|
62
60
|
DISPLAY: :42
|
|
63
61
|
run: |
|
|
64
|
-
uv run pytest --cov --color=yes --cov-report=xml
|
|
62
|
+
uv run pytest --cov --color=yes --cov-report=xml -n auto --dist worksteal
|
|
65
63
|
- name: Upload coverage to Codecov
|
|
66
|
-
uses: codecov/codecov-action@
|
|
64
|
+
uses: codecov/codecov-action@v5
|
|
67
65
|
with:
|
|
68
66
|
name: coverage
|
|
69
67
|
verbose: true
|
|
@@ -9,18 +9,18 @@ ci:
|
|
|
9
9
|
skip: []
|
|
10
10
|
repos:
|
|
11
11
|
- repo: https://github.com/rbubley/mirrors-prettier
|
|
12
|
-
rev: v3.8.
|
|
12
|
+
rev: v3.8.3
|
|
13
13
|
hooks:
|
|
14
14
|
- id: prettier
|
|
15
15
|
exclude: ^.github/workflows/test.yaml
|
|
16
16
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
17
|
-
rev: v1.
|
|
17
|
+
rev: v1.20.2
|
|
18
18
|
hooks:
|
|
19
19
|
- id: mypy
|
|
20
20
|
additional_dependencies: [numpy, types-requests]
|
|
21
21
|
exclude: tests/|docs/
|
|
22
22
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
23
|
-
rev: v0.
|
|
23
|
+
rev: v0.15.12
|
|
24
24
|
hooks:
|
|
25
25
|
- id: ruff
|
|
26
26
|
args: [--fix, --exit-non-zero-on-fix]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# https://docs.readthedocs.io/en/stable/config-file/v2.html
|
|
2
|
+
version: 2
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-24.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.13"
|
|
7
|
+
jobs:
|
|
8
|
+
post_checkout:
|
|
9
|
+
# unshallow so version can be derived from tag
|
|
10
|
+
- git fetch --unshallow || true
|
|
11
|
+
create_environment:
|
|
12
|
+
- asdf plugin add uv
|
|
13
|
+
- asdf install uv latest
|
|
14
|
+
- asdf global uv latest
|
|
15
|
+
build:
|
|
16
|
+
html:
|
|
17
|
+
- uv sync --group=docs --extra=torch
|
|
18
|
+
- uv run make --directory=docs html
|
|
19
|
+
- mv docs/_build $READTHEDOCS_OUTPUT
|
|
20
|
+
submodules:
|
|
21
|
+
include:
|
|
22
|
+
- "docs/tutorials/notebooks"
|
|
23
|
+
recursive: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spatialdata
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
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
|
|
@@ -42,7 +42,7 @@ Requires-Dist: anndata>=0.9.1
|
|
|
42
42
|
Requires-Dist: annsel>=0.1.2
|
|
43
43
|
Requires-Dist: click
|
|
44
44
|
Requires-Dist: dask-image
|
|
45
|
-
Requires-Dist: dask<2026.1.2,>=2025.
|
|
45
|
+
Requires-Dist: dask<2026.1.2,>=2025.12.0
|
|
46
46
|
Requires-Dist: datashader
|
|
47
47
|
Requires-Dist: distributed<2026.1.2
|
|
48
48
|
Requires-Dist: fsspec[http,s3]
|
|
@@ -51,7 +51,7 @@ Requires-Dist: multiscale-spatial-image==2.0.3
|
|
|
51
51
|
Requires-Dist: networkx
|
|
52
52
|
Requires-Dist: numba>=0.55.0
|
|
53
53
|
Requires-Dist: numpy
|
|
54
|
-
Requires-Dist: ome-zarr>=0.
|
|
54
|
+
Requires-Dist: ome-zarr>=0.14.0
|
|
55
55
|
Requires-Dist: pandas
|
|
56
56
|
Requires-Dist: pooch
|
|
57
57
|
Requires-Dist: pyarrow
|
|
@@ -66,32 +66,10 @@ Requires-Dist: universal-pathlib>=0.2.6
|
|
|
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
|
|
69
|
-
Provides-Extra: benchmark
|
|
70
|
-
Requires-Dist: asv; extra == 'benchmark'
|
|
71
|
-
Requires-Dist: memray; extra == 'benchmark'
|
|
72
|
-
Provides-Extra: dev
|
|
73
|
-
Requires-Dist: bump2version; extra == 'dev'
|
|
74
|
-
Requires-Dist: sentry-prevent-cli; extra == 'dev'
|
|
75
|
-
Provides-Extra: docs
|
|
76
|
-
Requires-Dist: ipython>=8.6.0; extra == 'docs'
|
|
77
|
-
Requires-Dist: myst-nb; extra == 'docs'
|
|
78
|
-
Requires-Dist: sphinx-autobuild; extra == 'docs'
|
|
79
|
-
Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
|
|
80
|
-
Requires-Dist: sphinx-book-theme>=1.0.0; extra == 'docs'
|
|
81
|
-
Requires-Dist: sphinx-copybutton; extra == 'docs'
|
|
82
|
-
Requires-Dist: sphinx-design; extra == 'docs'
|
|
83
|
-
Requires-Dist: sphinx-pytest; extra == 'docs'
|
|
84
|
-
Requires-Dist: sphinx>=4.5; extra == 'docs'
|
|
85
|
-
Requires-Dist: sphinxcontrib-bibtex>=1.0.0; extra == 'docs'
|
|
86
69
|
Provides-Extra: extra
|
|
87
70
|
Requires-Dist: napari-spatialdata[all]; extra == 'extra'
|
|
88
71
|
Requires-Dist: spatialdata-io; extra == 'extra'
|
|
89
72
|
Requires-Dist: spatialdata-plot; extra == 'extra'
|
|
90
|
-
Provides-Extra: test
|
|
91
|
-
Requires-Dist: pytest; extra == 'test'
|
|
92
|
-
Requires-Dist: pytest-cov; extra == 'test'
|
|
93
|
-
Requires-Dist: pytest-mock; extra == 'test'
|
|
94
|
-
Requires-Dist: torch; extra == 'test'
|
|
95
73
|
Provides-Extra: torch
|
|
96
74
|
Requires-Dist: torch; extra == 'torch'
|
|
97
75
|
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '0.7.3'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 7, 3)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = None
|
|
@@ -14,25 +14,63 @@ pip install -e '.[docs,test,benchmark]'
|
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
|
-
Running all the benchmarks is usually not needed. You run the benchmark using `asv run`. See the [asv documentation](https://asv.readthedocs.io/en/stable/commands.html#asv-run) for interesting arguments, like selecting the benchmarks you're interested in by providing a regex pattern `-b` or `--bench` that links to a function or class method
|
|
17
|
+
Running all the benchmarks is usually not needed. You run the benchmark using `asv run`. See the [asv documentation](https://asv.readthedocs.io/en/stable/commands.html#asv-run) for interesting arguments, like selecting the benchmarks you're interested in by providing a regex pattern `-b` or `--bench` that links to a function or class method. You can run the benchmark in your current environment with `--python=same`. Some example benchmarks:
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
### Import time benchmarks
|
|
20
|
+
|
|
21
|
+
Import benchmarks live in `benchmarks/benchmark_imports.py`. Each `timeraw_*` function returns a Python code snippet that asv runs in a fresh interpreter (cold import, empty module cache):
|
|
22
|
+
|
|
23
|
+
Run all import benchmarks in your current environment:
|
|
20
24
|
|
|
21
25
|
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
asv run --python=same --show-stderr -b timeraw
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or a single one:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
asv run --python=same --show-stderr -b timeraw_import_spatialdata
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Comparing the current branch against `main`
|
|
36
|
+
|
|
37
|
+
The simplest way is `asv continuous`, which builds both commits, runs the benchmarks, and prints the comparison in one shot:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
asv continuous --show-stderr -v -b timeraw main faster-import
|
|
30
41
|
```
|
|
31
42
|
|
|
43
|
+
Replace `faster-import` with any branch name or commit hash. The `-v` flag prints per-sample timings; drop it for a shorter summary.
|
|
44
|
+
|
|
45
|
+
Alternatively, collect results separately and compare afterwards:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# 1. Collect results for the tip of main and the tip of your branch
|
|
49
|
+
asv run --show-stderr -b timeraw main
|
|
50
|
+
asv run --show-stderr -b timeraw HEAD
|
|
51
|
+
|
|
52
|
+
# 2. Print a side-by-side comparison
|
|
53
|
+
asv compare main HEAD
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Both approaches build isolated environments from scratch. If you prefer to skip the rebuild and reuse your current environment (faster, less accurate):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
asv run --python=same --show-stderr -b timeraw HEAD
|
|
60
|
+
|
|
61
|
+
git stash && git checkout main
|
|
62
|
+
asv run --python=same --show-stderr -b timeraw HEAD
|
|
63
|
+
git checkout - && git stash pop
|
|
64
|
+
|
|
65
|
+
asv compare main HEAD
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Querying benchmarks
|
|
69
|
+
|
|
32
70
|
Querying using a bounding box without a spatial index is highly impacted by large amounts of points (transcripts), more than table rows (cells).
|
|
33
71
|
|
|
34
72
|
```
|
|
35
|
-
$
|
|
73
|
+
$ asv run --python=same --show-stderr -b time_query_bounding_box
|
|
36
74
|
|
|
37
75
|
[100.00%] ··· ======== ============ ============= ============= ==============
|
|
38
76
|
-- filter_table / n_transcripts_per_cell
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""Benchmarks for import times of the spatialdata package and its submodules.
|
|
2
|
+
|
|
3
|
+
Each ``timeraw_*`` function returns a snippet of Python code that asv runs in
|
|
4
|
+
a fresh interpreter, so the measured time reflects a cold import with an empty
|
|
5
|
+
module cache.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from collections.abc import Callable
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _timeraw(func: Any) -> Any:
|
|
13
|
+
"""Set asv benchmark attributes for a cold-import timeraw function."""
|
|
14
|
+
func.repeat = 5 # number of independent subprocess measurements
|
|
15
|
+
func.number = 1 # must be 1: second import in same process hits module cache
|
|
16
|
+
return func
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_timeraw
|
|
20
|
+
def timeraw_import_spatialdata() -> str:
|
|
21
|
+
"""Time a bare ``import spatialdata``."""
|
|
22
|
+
return """
|
|
23
|
+
import spatialdata
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@_timeraw
|
|
28
|
+
def timeraw_import_SpatialData() -> str:
|
|
29
|
+
"""Time importing the top-level ``SpatialData`` class."""
|
|
30
|
+
return """
|
|
31
|
+
from spatialdata import SpatialData
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@_timeraw
|
|
36
|
+
def timeraw_import_read_zarr() -> str:
|
|
37
|
+
"""Time importing ``read_zarr`` from the top-level namespace."""
|
|
38
|
+
return """
|
|
39
|
+
from spatialdata import read_zarr
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@_timeraw
|
|
44
|
+
def timeraw_import_models_elements() -> str:
|
|
45
|
+
"""Time importing the main element model classes."""
|
|
46
|
+
return """
|
|
47
|
+
from spatialdata.models import Image2DModel, Labels2DModel, PointsModel, ShapesModel, TableModel
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@_timeraw
|
|
52
|
+
def timeraw_import_transformations() -> str:
|
|
53
|
+
"""Time importing the ``spatialdata.transformations`` submodule."""
|
|
54
|
+
return """
|
|
55
|
+
from spatialdata.transformations import Affine, Scale, Translation, Sequence
|
|
56
|
+
"""
|
|
@@ -14,6 +14,23 @@ SpatialData is a data framework that comprises a FAIR storage format and a colle
|
|
|
14
14
|
|
|
15
15
|
Please see our publication {cite}`marconatoSpatialDataOpenUniversal2024` for citation and to learn more.
|
|
16
16
|
|
|
17
|
+
:::{note}
|
|
18
|
+
With dask >= 2025.2.0, users can get an error as described in [#1077](https://github.com/scverse/spatialdata/issues/1064). While we tried implementing fixes in SpatialData, it can be that
|
|
19
|
+
users perform operations on the `Points` data themselves and get this error. In order to prevent it, users can use a context manager we created.
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
from spatialdata import disable_dask_tune_optimization
|
|
23
|
+
import contextlib
|
|
24
|
+
...
|
|
25
|
+
|
|
26
|
+
with disable_dask_tune_optimization() if data.npartitions > 1 else contextlib.nullcontext():
|
|
27
|
+
<your operation on points dask dataframe>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This will disable dask graph optimization if the dataframe has more than 1 partition and otherwise keep it enabled. This solves
|
|
31
|
+
the problem discussed in this [dask issue](https://github.com/dask/dask/issues/12193). We are looking into an upstream fix.
|
|
32
|
+
:::
|
|
33
|
+
|
|
17
34
|
[//]: # "numfocus-fiscal-sponsor-attribution"
|
|
18
35
|
|
|
19
36
|
spatialdata is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).
|
|
@@ -26,7 +26,7 @@ dependencies = [
|
|
|
26
26
|
"annsel>=0.1.2",
|
|
27
27
|
"click",
|
|
28
28
|
"dask-image",
|
|
29
|
-
"dask>=2025.
|
|
29
|
+
"dask>=2025.12.0,<2026.1.2",
|
|
30
30
|
"distributed<2026.1.2",
|
|
31
31
|
"datashader",
|
|
32
32
|
"fsspec[s3,http]",
|
|
@@ -35,7 +35,7 @@ dependencies = [
|
|
|
35
35
|
"networkx",
|
|
36
36
|
"numba>=0.55.0",
|
|
37
37
|
"numpy",
|
|
38
|
-
"ome_zarr>=0.
|
|
38
|
+
"ome_zarr>=0.14.0",
|
|
39
39
|
"pandas",
|
|
40
40
|
"pooch",
|
|
41
41
|
"pyarrow",
|
|
@@ -51,16 +51,25 @@ dependencies = [
|
|
|
51
51
|
"xarray-spatial>=0.3.5",
|
|
52
52
|
"zarr>=3.0.0",
|
|
53
53
|
]
|
|
54
|
-
|
|
55
54
|
[project.optional-dependencies]
|
|
55
|
+
torch = [
|
|
56
|
+
"torch"
|
|
57
|
+
]
|
|
58
|
+
extra = [
|
|
59
|
+
"napari-spatialdata[all]",
|
|
60
|
+
"spatialdata-plot",
|
|
61
|
+
"spatialdata-io",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
[dependency-groups]
|
|
56
65
|
dev = [
|
|
57
66
|
"bump2version",
|
|
58
|
-
"sentry-prevent-cli",
|
|
59
67
|
]
|
|
60
68
|
test = [
|
|
61
69
|
"pytest",
|
|
62
70
|
"pytest-cov",
|
|
63
71
|
"pytest-mock",
|
|
72
|
+
"pytest-xdist",
|
|
64
73
|
"torch",
|
|
65
74
|
]
|
|
66
75
|
docs = [
|
|
@@ -79,14 +88,7 @@ docs = [
|
|
|
79
88
|
benchmark = [
|
|
80
89
|
"asv",
|
|
81
90
|
"memray",
|
|
82
|
-
|
|
83
|
-
torch = [
|
|
84
|
-
"torch"
|
|
85
|
-
]
|
|
86
|
-
extra = [
|
|
87
|
-
"napari-spatialdata[all]",
|
|
88
|
-
"spatialdata-plot",
|
|
89
|
-
"spatialdata-io",
|
|
91
|
+
"profimp",
|
|
90
92
|
]
|
|
91
93
|
|
|
92
94
|
[tool.coverage.run]
|
|
@@ -95,23 +97,25 @@ omit = [
|
|
|
95
97
|
"**/test_*.py",
|
|
96
98
|
]
|
|
97
99
|
|
|
98
|
-
[tool.pytest
|
|
100
|
+
[tool.pytest]
|
|
99
101
|
testpaths = ["tests"]
|
|
100
|
-
|
|
102
|
+
strict = true
|
|
101
103
|
addopts = [
|
|
102
|
-
# "-Werror", # if 3rd party libs raise DeprecationWarnings, just use filterwarnings below
|
|
103
104
|
"--import-mode=importlib", # allow using test files with same name
|
|
104
105
|
"-s", # print output from tests
|
|
106
|
+
"-p no:napari", # napari registers a pytest plugin via its entry point; disable it here since spatialdata tests don't need it
|
|
105
107
|
]
|
|
106
108
|
# These are all markers coming from xarray, dask or anndata. Added here to silence warnings.
|
|
107
109
|
markers = [
|
|
108
110
|
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
|
109
111
|
"gpu: run test on GPU using CuPY.",
|
|
112
|
+
"array_api: used by anndata.tests.helpers, not us",
|
|
110
113
|
"skip_with_pyarrow_strings: skipwhen pyarrow string conversion is turned on",
|
|
111
114
|
]
|
|
112
115
|
# info on how to use this https://stackoverflow.com/questions/57925071/how-do-i-avoid-getting-deprecationwarning-from-inside-dependencies-with-pytest
|
|
113
116
|
filterwarnings = [
|
|
114
|
-
#
|
|
117
|
+
# "error", # if 3rd party libs raise DeprecationWarnings, TODO: filter them individually below
|
|
118
|
+
# "ignore:.*U.*mode is deprecated:DeprecationWarning",
|
|
115
119
|
]
|
|
116
120
|
|
|
117
121
|
[tool.jupytext]
|
|
@@ -183,6 +187,9 @@ select = [
|
|
|
183
187
|
]
|
|
184
188
|
unfixable = ["B", "C4", "UP", "BLE", "T20", "RET"]
|
|
185
189
|
|
|
190
|
+
[tool.ruff.lint.isort]
|
|
191
|
+
required-imports = ["from __future__ import annotations"]
|
|
192
|
+
|
|
186
193
|
[tool.ruff.lint.pydocstyle]
|
|
187
194
|
convention = "numpy"
|
|
188
195
|
|