spatialdata 0.3.0__tar.gz → 0.4.0__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.
Files changed (160) hide show
  1. {spatialdata-0.3.0 → spatialdata-0.4.0}/.github/ISSUE_TEMPLATE/bug_report.md +3 -2
  2. {spatialdata-0.3.0 → spatialdata-0.4.0}/.github/release.yml +11 -5
  3. spatialdata-0.4.0/.github/workflows/build_image.yml +100 -0
  4. {spatialdata-0.3.0 → spatialdata-0.4.0}/.github/workflows/test.yaml +5 -22
  5. {spatialdata-0.3.0 → spatialdata-0.4.0}/.pre-commit-config.yaml +4 -11
  6. spatialdata-0.4.0/Dockerfile +51 -0
  7. {spatialdata-0.3.0 → spatialdata-0.4.0}/LICENSE +1 -1
  8. {spatialdata-0.3.0 → spatialdata-0.4.0}/PKG-INFO +16 -14
  9. {spatialdata-0.3.0 → spatialdata-0.4.0}/README.md +12 -11
  10. {spatialdata-0.3.0 → spatialdata-0.4.0}/_version.py +9 -4
  11. {spatialdata-0.3.0 → spatialdata-0.4.0}/benchmarks/spatialdata_benchmark.py +0 -1
  12. {spatialdata-0.3.0 → spatialdata-0.4.0}/benchmarks/utils.py +1 -1
  13. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/io.md +2 -1
  14. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/operations.md +1 -0
  15. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/contributing.md +0 -1
  16. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/design_doc.md +14 -184
  17. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/extensions/typed_returns.py +1 -1
  18. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/index.md +17 -3
  19. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/installation.md +33 -0
  20. {spatialdata-0.3.0 → spatialdata-0.4.0}/pyproject.toml +9 -28
  21. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/__init__.py +3 -0
  22. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/concatenate.py +8 -2
  23. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/operations/_utils.py +5 -4
  24. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/operations/aggregate.py +5 -7
  25. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/operations/rasterize.py +7 -4
  26. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/operations/transform.py +3 -3
  27. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/operations/vectorize.py +2 -2
  28. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/query/_utils.py +24 -2
  29. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/query/relational_query.py +58 -5
  30. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/spatialdata.py +7 -8
  31. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_io/_utils.py +62 -4
  32. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_io/format.py +37 -2
  33. spatialdata-0.4.0/src/spatialdata/_io/io_table.py +110 -0
  34. spatialdata-0.4.0/src/spatialdata/_io/io_zarr.py +238 -0
  35. spatialdata-0.4.0/src/spatialdata/config.py +4 -0
  36. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/dataloader/datasets.py +3 -3
  37. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/models/models.py +132 -20
  38. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/testing.py +3 -3
  39. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/transformations/operations.py +1 -1
  40. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/conftest.py +2 -4
  41. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/operations/test_rasterize_bins.py +1 -1
  42. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/operations/test_spatialdata_operations.py +178 -40
  43. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/query/test_relational_query.py +197 -46
  44. spatialdata-0.4.0/tests/core/query/test_relational_query_match_sdata_to_table.py +144 -0
  45. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/query/test_spatial_query.py +5 -2
  46. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/io/test_format.py +25 -1
  47. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/io/test_metadata.py +1 -2
  48. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/io/test_multi_table.py +1 -1
  49. spatialdata-0.4.0/tests/io/test_partial_read.py +316 -0
  50. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/io/test_pyramids_performance.py +2 -2
  51. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/io/test_utils.py +20 -1
  52. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/models/test_models.py +136 -16
  53. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/transformations/test_transformations.py +1 -1
  54. spatialdata-0.3.0/Dockerfile +0 -12
  55. spatialdata-0.3.0/src/spatialdata/_io/io_table.py +0 -95
  56. spatialdata-0.3.0/src/spatialdata/_io/io_zarr.py +0 -159
  57. {spatialdata-0.3.0 → spatialdata-0.4.0}/.bumpversion.cfg +0 -0
  58. {spatialdata-0.3.0 → spatialdata-0.4.0}/.editorconfig +0 -0
  59. {spatialdata-0.3.0 → spatialdata-0.4.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  60. {spatialdata-0.3.0 → spatialdata-0.4.0}/.github/codecov.yml +0 -0
  61. {spatialdata-0.3.0 → spatialdata-0.4.0}/.github/workflows/release.yaml +0 -0
  62. {spatialdata-0.3.0 → spatialdata-0.4.0}/.gitignore +0 -0
  63. {spatialdata-0.3.0 → spatialdata-0.4.0}/.gitmodules +0 -0
  64. {spatialdata-0.3.0 → spatialdata-0.4.0}/.mypy.ini +0 -0
  65. {spatialdata-0.3.0 → spatialdata-0.4.0}/.readthedocs.yaml +0 -0
  66. {spatialdata-0.3.0 → spatialdata-0.4.0}/CHANGELOG.md +0 -0
  67. {spatialdata-0.3.0 → spatialdata-0.4.0}/asv.conf.json +0 -0
  68. {spatialdata-0.3.0 → spatialdata-0.4.0}/benchmarks/README.md +0 -0
  69. {spatialdata-0.3.0 → spatialdata-0.4.0}/benchmarks/__init__.py +0 -0
  70. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/Makefile +0 -0
  71. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/_static/.gitkeep +0 -0
  72. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/_static/css/custom.css +0 -0
  73. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/_static/img/spatialdata_horizontal.png +0 -0
  74. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/_templates/.gitkeep +0 -0
  75. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/_templates/autosummary/base.rst +0 -0
  76. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/_templates/autosummary/class.rst +0 -0
  77. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/_templates/autosummary/function.rst +0 -0
  78. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/SpatialData.md +0 -0
  79. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/data_formats.md +0 -0
  80. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/dataloader.md +0 -0
  81. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/datasets.md +0 -0
  82. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/models.md +0 -0
  83. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/models_utils.md +0 -0
  84. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/testing.md +0 -0
  85. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/transformations.md +0 -0
  86. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api/transformations_utils.md +0 -0
  87. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/api.md +0 -0
  88. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/changelog.md +0 -0
  89. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/conf.py +0 -0
  90. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/glossary.md +0 -0
  91. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/references.bib +0 -0
  92. {spatialdata-0.3.0 → spatialdata-0.4.0}/docs/references.md +0 -0
  93. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/__main__.py +0 -0
  94. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_bridges/__init__.py +0 -0
  95. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/__init__.py +0 -0
  96. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/_deepcopy.py +0 -0
  97. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/_elements.py +0 -0
  98. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/_utils.py +0 -0
  99. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/centroids.py +0 -0
  100. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/data_extent.py +0 -0
  101. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/operations/__init__.py +0 -0
  102. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/operations/map.py +0 -0
  103. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/operations/rasterize_bins.py +0 -0
  104. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/query/__init__.py +0 -0
  105. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/query/spatial_query.py +0 -0
  106. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_core/validation.py +0 -0
  107. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_docs.py +0 -0
  108. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_io/__init__.py +0 -0
  109. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_io/io_points.py +0 -0
  110. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_io/io_raster.py +0 -0
  111. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_io/io_shapes.py +0 -0
  112. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_logging.py +0 -0
  113. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_types.py +0 -0
  114. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/_utils.py +0 -0
  115. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/dataloader/__init__.py +0 -0
  116. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/datasets.py +0 -0
  117. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/io/__init__.py +0 -0
  118. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/models/__init__.py +0 -0
  119. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/models/_utils.py +0 -0
  120. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/transformations/__init__.py +0 -0
  121. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/transformations/_utils.py +0 -0
  122. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/transformations/ngff/__init__.py +0 -0
  123. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/transformations/ngff/_utils.py +0 -0
  124. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/transformations/ngff/ngff_coordinate_system.py +0 -0
  125. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/transformations/ngff/ngff_transformations.py +0 -0
  126. {spatialdata-0.3.0 → spatialdata-0.4.0}/src/spatialdata/transformations/transformations.py +0 -0
  127. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/__init__.py +0 -0
  128. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/__init__.py +0 -0
  129. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/operations/__init__.py +0 -0
  130. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/operations/test_aggregations.py +0 -0
  131. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/operations/test_map.py +0 -0
  132. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/operations/test_rasterize.py +0 -0
  133. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/operations/test_transform.py +0 -0
  134. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/operations/test_vectorize.py +0 -0
  135. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/query/__init__.py +0 -0
  136. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/test_centroids.py +0 -0
  137. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/test_data_extent.py +0 -0
  138. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/test_deepcopy.py +0 -0
  139. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/test_get_attrs.py +0 -0
  140. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/core/test_validation.py +0 -0
  141. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/data/multipolygon.json +0 -0
  142. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/data/points.json +0 -0
  143. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/data/polygon.json +0 -0
  144. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/dataloader/__init__.py +0 -0
  145. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/dataloader/test_datasets.py +0 -0
  146. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/datasets/__init__.py +0 -0
  147. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/datasets/test_datasets.py +0 -0
  148. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/io/__init__.py +0 -0
  149. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/io/test_readwrite.py +0 -0
  150. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/io/test_versions.py +0 -0
  151. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/models/__init__.py +0 -0
  152. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/transformations/__init__.py +0 -0
  153. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/transformations/ngff/__init__.py +0 -0
  154. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/transformations/ngff/conftest.py +0 -0
  155. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/transformations/ngff/test_ngff_coordinate_system.py +0 -0
  156. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/transformations/ngff/test_ngff_transformations.py +0 -0
  157. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/transformations/test_transformations_utils.py +0 -0
  158. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/utils/__init__.py +0 -0
  159. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/utils/test_element_utils.py +0 -0
  160. {spatialdata-0.3.0 → spatialdata-0.4.0}/tests/utils/test_testing.py +0 -0
@@ -9,7 +9,7 @@ assignees: ""
9
9
  **Recommendation: attach a minimal working example**
10
10
  Generally, the easier it is for us to reproduce the issue, the faster we can work on it. It is not required, but if you can, please:
11
11
 
12
- 1. Reproduce using the [`blobs` dataset](https://spatialdata.scverse.org/en/latest/generated/spatialdata.datasets.blobs.html)
12
+ 1. Reproduce using the [`blobs` dataset](https://spatialdata.scverse.org/en/stable/api/datasets.html#spatialdata.datasets.blobs)
13
13
 
14
14
  ```python
15
15
  from spatialdata.datasets import blobs
@@ -17,7 +17,8 @@ Generally, the easier it is for us to reproduce the issue, the faster we can wor
17
17
  sdata = blobs()
18
18
  ```
19
19
 
20
- You can also use [`blobs_annotating_element`](https://spatialdata.scverse.org/en/latest/generated/spatialdata.datasets.blobs_annotating_element.html) for more control:
20
+ You can also use [`blobs_annotating_element`](https://spatialdata.scverse.org/en/stable/api/datasets.html#spatialdata.datasets.blobs_annotating_element) for more
21
+ control:
21
22
 
22
23
  ```
23
24
  from spatialdata.datasets import blobs_annotating_element
@@ -5,18 +5,24 @@ changelog:
5
5
  authors:
6
6
  - pre-commit-ci
7
7
  categories:
8
- - title: Major
8
+ - title: Added
9
9
  labels:
10
- - "release-major"
11
- - title: Minor
12
- labels:
13
- - "release-minor"
10
+ - "release-added"
14
11
  - title: Changed
15
12
  labels:
16
13
  - "release-changed"
14
+ - title: Deprecated
15
+ labels:
16
+ - "release-deprecated"
17
+ - title: Removed
18
+ labels:
19
+ - "release-removed"
17
20
  - title: Fixed
18
21
  labels:
19
22
  - "release-fixed"
23
+ - title: Security
24
+ labels:
25
+ - "release-security"
20
26
  - title: Other Changes
21
27
  labels:
22
28
  - "*"
@@ -0,0 +1,100 @@
1
+ name: Build Docker image
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ # schedule:
6
+ # - cron: '0 0 * * *' # run daily at midnight UTC
7
+
8
+ env:
9
+ REGISTRY: ghcr.io
10
+ IMAGE_NAME: ${{ github.repository }}
11
+
12
+ concurrency:
13
+ group: ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ build:
18
+ runs-on: ubuntu-latest
19
+
20
+ defaults:
21
+ run:
22
+ shell: bash -e {0} # -e to fail on error
23
+
24
+ permissions:
25
+ contents: read
26
+ packages: write
27
+ attestations: write
28
+ id-token: write
29
+
30
+ steps:
31
+ - name: Checkout code
32
+ uses: actions/checkout@v4
33
+
34
+ - name: Set up Python
35
+ uses: actions/setup-python@v4
36
+ with:
37
+ python-version: "3.x"
38
+
39
+ - name: Upgrade pip
40
+ run: pip install pip
41
+
42
+ - name: Get latest versions
43
+ id: get_versions
44
+ run: |
45
+ SPATIALDATA_VERSION=$(pip index versions spatialdata | grep "Available versions" | sed 's/Available versions: //' | awk -F', ' '{print $1}')
46
+ SPATIALDATA_IO_VERSION=$(pip index versions spatialdata-io | grep "Available versions" | sed 's/Available versions: //' | awk -F', ' '{print $1}')
47
+ SPATIALDATA_PLOT_VERSION=$(pip index versions spatialdata-plot | grep "Available versions" | sed 's/Available versions: //' | awk -F', ' '{print $1}')
48
+ echo "SPATIALDATA_VERSION=${SPATIALDATA_VERSION}" >> $GITHUB_ENV
49
+ echo "SPATIALDATA_IO_VERSION=${SPATIALDATA_IO_VERSION}" >> $GITHUB_ENV
50
+ echo "SPATIALDATA_PLOT_VERSION=${SPATIALDATA_PLOT_VERSION}" >> $GITHUB_ENV
51
+
52
+ - name: Check if image tag exists
53
+ id: check_tag
54
+ env:
55
+ IMAGE_TAG_SUFFIX: spatialdata${{ env.SPATIALDATA_VERSION }}_spatialdata-io${{ env.SPATIALDATA_IO_VERSION }}_spatialdata-plot${{ env.SPATIALDATA_PLOT_VERSION }}
56
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57
+ run: |
58
+ # Define the API URL
59
+ API_URL="https://api.github.com/orgs/scverse/packages/container/spatialdata/versions"
60
+
61
+ # Fetch all existing versions
62
+ existing_tags=$(curl -s -H "Authorization: token $GITHUB_TOKEN" $API_URL | jq -r '.[].metadata.container.tags[]')
63
+
64
+ # Debug: Output all existing tags
65
+ echo "Existing tags:"
66
+ echo "$existing_tags"
67
+
68
+ # Check if the constructed tag exists
69
+ if echo "$existing_tags" | grep -q "$IMAGE_TAG_SUFFIX"; then
70
+ echo "Image tag $IMAGE_TAG_SUFFIX already exists. Skipping build."
71
+ echo "skip_build=true" >> $GITHUB_ENV
72
+ else
73
+ echo "Image tag $IMAGE_TAG_SUFFIX does not exist. Proceeding with build."
74
+ echo "skip_build=false" >> $GITHUB_ENV
75
+ echo "IMAGE_TAG_SUFFIX=${IMAGE_TAG_SUFFIX}" >> $GITHUB_ENV
76
+ fi
77
+
78
+ - name: Login to GitHub Container Registry
79
+ if: ${{ env.skip_build == 'false' }}
80
+ uses: docker/login-action@v3
81
+ with:
82
+ registry: ${{ env.REGISTRY }}
83
+ username: ${{ github.actor }}
84
+ password: ${{ secrets.GITHUB_TOKEN }}
85
+
86
+ - uses: docker/build-push-action@v5
87
+ if: ${{ env.skip_build == 'false' }}
88
+ env:
89
+ IMAGE_TAG: ${{ env.REGISTRY }}/scverse/spatialdata:${{ env.IMAGE_TAG_SUFFIX }}
90
+ with:
91
+ context: .
92
+ file: ./Dockerfile
93
+ push: true
94
+ cache-from: type=registry,ref=${{ env.REGISTRY }}/scverse/spatialdata:buildcache
95
+ cache-to: type=inline,ref=${{ env.REGISTRY }}/scverse/spatialdata:buildcache
96
+ build-args: |
97
+ SPATIALDATA_VERSION=${{ env.SPATIALDATA_VERSION }}
98
+ SPATIALDATA_IO_VERSION=${{ env.SPATIALDATA_IO_VERSION }}
99
+ SPATIALDATA_PLOT_VERSION=${{ env.SPATIALDATA_PLOT_VERSION }}
100
+ tags: ${{ env.IMAGE_TAG }}
@@ -34,37 +34,20 @@ jobs:
34
34
 
35
35
  steps:
36
36
  - uses: actions/checkout@v2
37
- - name: Set up Python ${{ matrix.python }}
38
- uses: actions/setup-python@v4
37
+ - uses: astral-sh/setup-uv@v5
38
+ id: setup-uv
39
39
  with:
40
+ version: "latest"
40
41
  python-version: ${{ matrix.python }}
41
- cache: pip
42
-
43
- - name: Get pip cache dir
44
- id: pip-cache-dir
45
- run: |
46
- echo "::set-output name=dir::$(pip cache dir)"
47
- - name: Restore pip cache
48
- uses: actions/cache@v2
49
- with:
50
- path: ${{ steps.pip-cache-dir.outputs.dir }}
51
- key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}
52
- restore-keys: |
53
- pip-${{ runner.os }}-${{ env.pythonLocation }}-
54
- - name: Install test dependencies
55
- run: |
56
- python -m pip install --upgrade pip wheel
57
- pip install pytest-cov
58
42
  - name: Install dependencies
59
- run: |
60
- pip install ${{ matrix.pip-flags }} -e ".[dev,test,torch]"
43
+ run: "uv sync --extra test"
61
44
  - name: Test
62
45
  env:
63
46
  MPLBACKEND: agg
64
47
  PLATFORM: ${{ matrix.os }}
65
48
  DISPLAY: :42
66
49
  run: |
67
- pytest --cov --color=yes --cov-report=xml
50
+ uv run pytest --cov --color=yes --cov-report=xml
68
51
  - name: Upload coverage to Codecov
69
52
  uses: codecov/codecov-action@v4
70
53
  with:
@@ -8,26 +8,19 @@ minimum_pre_commit_version: 2.16.0
8
8
  ci:
9
9
  skip: []
10
10
  repos:
11
- - repo: https://github.com/psf/black
12
- rev: 24.10.0
13
- hooks:
14
- - id: black
15
11
  - repo: https://github.com/rbubley/mirrors-prettier
16
- rev: v3.4.2
12
+ rev: v3.5.3
17
13
  hooks:
18
14
  - id: prettier
19
- - repo: https://github.com/asottile/blacken-docs
20
- rev: 1.19.1
21
- hooks:
22
- - id: blacken-docs
23
15
  - repo: https://github.com/pre-commit/mirrors-mypy
24
- rev: v1.14.1
16
+ rev: v1.15.0
25
17
  hooks:
26
18
  - id: mypy
27
19
  additional_dependencies: [numpy, types-requests]
28
20
  exclude: tests/|docs/
29
21
  - repo: https://github.com/astral-sh/ruff-pre-commit
30
- rev: v0.9.1
22
+ rev: v0.11.6
31
23
  hooks:
32
24
  - id: ruff
33
25
  args: [--fix, --exit-non-zero-on-fix]
26
+ - id: ruff-format
@@ -0,0 +1,51 @@
1
+ ARG TARGETPLATFORM=linux/amd64
2
+
3
+ # Use the specified platform to pull the correct base image.
4
+ # Override TARGETPLATFORM during build for different architectures, such as linux/arm64 for Apple Silicon.
5
+ # For example, to build for ARM64 architecture (e.g., Apple Silicon),
6
+ # use the following command on the command line:
7
+ #
8
+ # docker build --build-arg TARGETPLATFORM=linux/arm64 -t my-arm-image .
9
+ #
10
+ # Similarly, to build for the default x86_64 architecture, you can use:
11
+ #
12
+ # docker build --build-arg TARGETPLATFORM=linux/amd64 -t my-amd64-image .
13
+ #
14
+ FROM --platform=$TARGETPLATFORM ubuntu:latest
15
+ LABEL authors="Luca Marconato"
16
+
17
+ ENV PYTHONUNBUFFERED=1
18
+
19
+ ARG SPATIALDATA_VERSION
20
+ ARG SPATIALDATA_IO_VERSION
21
+ ARG SPATIALDATA_PLOT_VERSION
22
+
23
+ # debugging
24
+ RUN echo "Target Platform: ${TARGETPLATFORM}" && \
25
+ echo "spatialdata version: ${SPATIALDATA_VERSION}" && \
26
+ echo "spatialdata-io version: ${SPATIALDATA_IO_VERSION}" && \
27
+ echo "spatialdata-plot version: ${SPATIALDATA_PLOT_VERSION}"
28
+
29
+ # Update and install system dependencies.
30
+ RUN apt-get update && \
31
+ apt-get install -y --no-install-recommends \
32
+ build-essential \
33
+ python3-venv \
34
+ python3-dev \
35
+ git \
36
+ && rm -rf /var/lib/apt/lists/*
37
+
38
+ # setup python virtual environment
39
+ RUN python3 -m venv /opt/venv
40
+ ENV PATH="/opt/venv/bin:$PATH"
41
+ RUN pip install --upgrade pip wheel
42
+
43
+ # Install the libraries with specific versions
44
+ RUN pip install --no-cache-dir \
45
+ spatialdata[torch]==${SPATIALDATA_VERSION} \
46
+ spatialdata-io==${SPATIALDATA_IO_VERSION} \
47
+ spatialdata-plot==${SPATIALDATA_PLOT_VERSION}
48
+
49
+ LABEL spatialdata_version="${SPATIALDATA_VERSION}" \
50
+ spatialdata_io_version="${SPATIALDATA_IO_VERSION}" \
51
+ spatialdata_plot_version="${SPATIALDATA_PLOT_VERSION}"
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2022, scverse
3
+ Copyright (c) 2022, scverse®
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spatialdata
3
- Version: 0.3.0
3
+ Version: 0.4.0
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
@@ -9,7 +9,7 @@ Author: scverse
9
9
  Maintainer-email: scverse <giov.pll@gmail.com>
10
10
  License: BSD 3-Clause License
11
11
 
12
- Copyright (c) 2022, scverse
12
+ Copyright (c) 2022, scverse®
13
13
  All rights reserved.
14
14
 
15
15
  Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,7 @@ Requires-Dist: fsspec
46
46
  Requires-Dist: geopandas>=0.14
47
47
  Requires-Dist: multiscale-spatial-image>=2.0.2
48
48
  Requires-Dist: networkx
49
- Requires-Dist: numba
49
+ Requires-Dist: numba>=0.55.0
50
50
  Requires-Dist: numpy
51
51
  Requires-Dist: ome-zarr>=0.8.4
52
52
  Requires-Dist: pandas
@@ -59,6 +59,7 @@ Requires-Dist: setuptools
59
59
  Requires-Dist: shapely>=2.0.1
60
60
  Requires-Dist: spatial-image>=1.1.0
61
61
  Requires-Dist: typing-extensions>=4.8.0
62
+ Requires-Dist: xarray-dataclasses>=1.8.0
62
63
  Requires-Dist: xarray-schema
63
64
  Requires-Dist: xarray-spatial>=0.3.5
64
65
  Requires-Dist: xarray>=2024.10.0
@@ -111,14 +112,15 @@ SpatialData is a data framework that comprises a FAIR storage format and a colle
111
112
 
112
113
  [//]: # "numfocus-fiscal-sponsor-attribution"
113
114
 
114
- The spatialdata project uses a [consensus based governance model](https://scverse.org/about/roles/) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/). Consider making a [tax-deductible donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
115
+ 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/).
116
+ If you like scverse® and want to support our mission, please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
115
117
 
116
118
  The spatialdata project also received support by the Chan Zuckerberg Initiative.
117
119
 
118
120
  <div align="center">
119
121
  <a href="https://numfocus.org/project/scverse">
120
- <img height="60px"
121
- src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
122
+ <img height="60px"
123
+ src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
122
124
  align="center">
123
125
  </a>
124
126
  </div>
@@ -134,7 +136,7 @@ The spatialdata project also received support by the Chan Zuckerberg Initiative.
134
136
  Please refer to the [documentation][link-docs]. In particular:
135
137
 
136
138
  - [API documentation][link-api].
137
- - [Design doc][link-design-doc].
139
+ - [Design doc][link-design-doc] (includes the roadmap).
138
140
  - [Example notebooks][link-notebooks].
139
141
 
140
142
  Another useful resource to get started is the source code of the [`spatialdata-io`](https://github.com/scverse/spatialdata-io) package, which shows example of how to read data from common technologies.
@@ -147,7 +149,8 @@ Check out the docs for more complete [installation instructions](https://spatial
147
149
  pip install "spatialdata[extra]"
148
150
  ```
149
151
 
150
- or via conda:
152
+ ~~or via conda:~~
153
+ Update Feb 2025: `spatialdata` cannot be currently be installed via `conda` because some dependencies of our dependencies are not updated in `conda-forge` and we are still waiting for an update. Please install from `pip`; the latest versions of the `spatialdata` libraries are always available via `PyPI`.
151
154
 
152
155
  ```bash
153
156
  mamba install -c conda-forge spatialdata napari-spatialdata spatialdata-io spatialdata-plot
@@ -178,11 +181,10 @@ Marconato, L., Palla, G., Yamauchi, K.A. et al. SpatialData: an open and univers
178
181
 
179
182
  [scverse-discourse]: https://discourse.scverse.org/
180
183
  [issue-tracker]: https://github.com/scverse/spatialdata/issues
181
- [changelog]: https://spatialdata.readthedocs.io/latest/changelog.html
182
- [design doc]: https://scverse-spatialdata.readthedocs.io/en/latest/design_doc.html
183
- [link-docs]: https://spatialdata.scverse.org/en/latest/
184
- [link-api]: https://spatialdata.scverse.org/en/latest/api.html
185
- [link-design-doc]: https://spatialdata.scverse.org/en/latest/design_doc.html
186
- [link-notebooks]: https://spatialdata.scverse.org/en/latest/tutorials/notebooks/notebooks.html
184
+ [design doc]: https://scverse-spatialdata.readthedocs.io/en/stable/design_doc.html
185
+ [link-docs]: https://spatialdata.scverse.org/en/stable/
186
+ [link-api]: https://spatialdata.scverse.org/en/stable/api.html
187
+ [link-design-doc]: https://spatialdata.scverse.org/en/stable/design_doc.html
188
+ [link-notebooks]: https://spatialdata.scverse.org/en/stable/tutorials/notebooks/notebooks.html
187
189
  [badge-tests]: https://github.com/scverse/spatialdata/actions/workflows/test.yaml/badge.svg
188
190
  [link-tests]: https://github.com/scverse/spatialdata/actions/workflows/test.yaml
@@ -18,14 +18,15 @@ SpatialData is a data framework that comprises a FAIR storage format and a colle
18
18
 
19
19
  [//]: # "numfocus-fiscal-sponsor-attribution"
20
20
 
21
- The spatialdata project uses a [consensus based governance model](https://scverse.org/about/roles/) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/). Consider making a [tax-deductible donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
21
+ 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/).
22
+ If you like scverse® and want to support our mission, please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
22
23
 
23
24
  The spatialdata project also received support by the Chan Zuckerberg Initiative.
24
25
 
25
26
  <div align="center">
26
27
  <a href="https://numfocus.org/project/scverse">
27
- <img height="60px"
28
- src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
28
+ <img height="60px"
29
+ src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
29
30
  align="center">
30
31
  </a>
31
32
  </div>
@@ -41,7 +42,7 @@ The spatialdata project also received support by the Chan Zuckerberg Initiative.
41
42
  Please refer to the [documentation][link-docs]. In particular:
42
43
 
43
44
  - [API documentation][link-api].
44
- - [Design doc][link-design-doc].
45
+ - [Design doc][link-design-doc] (includes the roadmap).
45
46
  - [Example notebooks][link-notebooks].
46
47
 
47
48
  Another useful resource to get started is the source code of the [`spatialdata-io`](https://github.com/scverse/spatialdata-io) package, which shows example of how to read data from common technologies.
@@ -54,7 +55,8 @@ Check out the docs for more complete [installation instructions](https://spatial
54
55
  pip install "spatialdata[extra]"
55
56
  ```
56
57
 
57
- or via conda:
58
+ ~~or via conda:~~
59
+ Update Feb 2025: `spatialdata` cannot be currently be installed via `conda` because some dependencies of our dependencies are not updated in `conda-forge` and we are still waiting for an update. Please install from `pip`; the latest versions of the `spatialdata` libraries are always available via `PyPI`.
58
60
 
59
61
  ```bash
60
62
  mamba install -c conda-forge spatialdata napari-spatialdata spatialdata-io spatialdata-plot
@@ -85,11 +87,10 @@ Marconato, L., Palla, G., Yamauchi, K.A. et al. SpatialData: an open and univers
85
87
 
86
88
  [scverse-discourse]: https://discourse.scverse.org/
87
89
  [issue-tracker]: https://github.com/scverse/spatialdata/issues
88
- [changelog]: https://spatialdata.readthedocs.io/latest/changelog.html
89
- [design doc]: https://scverse-spatialdata.readthedocs.io/en/latest/design_doc.html
90
- [link-docs]: https://spatialdata.scverse.org/en/latest/
91
- [link-api]: https://spatialdata.scverse.org/en/latest/api.html
92
- [link-design-doc]: https://spatialdata.scverse.org/en/latest/design_doc.html
93
- [link-notebooks]: https://spatialdata.scverse.org/en/latest/tutorials/notebooks/notebooks.html
90
+ [design doc]: https://scverse-spatialdata.readthedocs.io/en/stable/design_doc.html
91
+ [link-docs]: https://spatialdata.scverse.org/en/stable/
92
+ [link-api]: https://spatialdata.scverse.org/en/stable/api.html
93
+ [link-design-doc]: https://spatialdata.scverse.org/en/stable/design_doc.html
94
+ [link-notebooks]: https://spatialdata.scverse.org/en/stable/tutorials/notebooks/notebooks.html
94
95
  [badge-tests]: https://github.com/scverse/spatialdata/actions/workflows/test.yaml/badge.svg
95
96
  [link-tests]: https://github.com/scverse/spatialdata/actions/workflows/test.yaml
@@ -1,8 +1,13 @@
1
- # file generated by setuptools_scm
1
+ # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
3
6
  TYPE_CHECKING = False
4
7
  if TYPE_CHECKING:
5
- from typing import Tuple, Union
8
+ from typing import Tuple
9
+ from typing import Union
10
+
6
11
  VERSION_TUPLE = Tuple[Union[int, str], ...]
7
12
  else:
8
13
  VERSION_TUPLE = object
@@ -12,5 +17,5 @@ __version__: str
12
17
  __version_tuple__: VERSION_TUPLE
13
18
  version_tuple: VERSION_TUPLE
14
19
 
15
- __version__ = version = '0.3.0'
16
- __version_tuple__ = version_tuple = (0, 3, 0)
20
+ __version__ = version = '0.4.0'
21
+ __version_tuple__ = version_tuple = (0, 4, 0)
@@ -44,7 +44,6 @@ class TimeMapRaster:
44
44
 
45
45
 
46
46
  class TimeQueries:
47
-
48
47
  params = ([100, 1_000, 10_000], [True, False], [100, 1_000])
49
48
  param_names = ["length", "filter_table", "n_transcripts_per_cell"]
50
49
 
@@ -8,7 +8,7 @@ Functions that make running and debugging benchmarks easier:
8
8
  - function run_benchmark is used to run the benchmarks.
9
9
 
10
10
  Performant dataset generation functions so the benchmarks run fast even for large artificial datasets.
11
- The object is to generate a dataset containing many cells. By copying the same cell values instead of
11
+ The object is to generate a dataset containing many cells. By copying the same cell values instead of
12
12
  doing gaussian blur on the whole image, we can generate the same dataset in a fraction of the time.
13
13
  - function labeled_particles is used to generate labeled blobs.
14
14
  - function _generate_ball is used to generate a ball of given radius and dimension.
@@ -1,6 +1,7 @@
1
1
  # Input/Output
2
2
 
3
- To read the data from a specific technology (e.g., Xenium, MERSCOPE, ...), you can use any of the [spatialdata-io readers](https://spatialdata.scverse.org/projects/io/en/latest/api.html).
3
+ To read the data from a specific technology (e.g., Xenium, MERSCOPE, ...), you can
4
+ use any of the [spatialdata-io readers](https://spatialdata.scverse.org/projects/io/en/stable/api.html).
4
5
 
5
6
  ```{eval-rst}
6
7
  .. currentmodule:: spatialdata
@@ -14,6 +14,7 @@ Operations on `SpatialData` objects.
14
14
  .. autofunction:: join_spatialelement_table
15
15
  .. autofunction:: match_element_to_table
16
16
  .. autofunction:: match_table_to_element
17
+ .. autofunction:: match_sdata_to_table
17
18
  .. autofunction:: concatenate
18
19
  .. autofunction:: transform
19
20
  .. autofunction:: rasterize
@@ -231,7 +231,6 @@ To find out the time or memory performance of your code, profilers can help. Aga
231
231
  <!-- Links -->
232
232
 
233
233
  [scanpy developer guide]: https://scanpy.readthedocs.io/en/latest/dev/index.html
234
- [spatialdata-io]: https://spatialdata-io.readthedocs.io/en/latest/template_usage.html
235
234
  [github quickstart guide]: https://docs.github.com/en/get-started/quickstart/create-a-repo?tool=webui
236
235
  [codecov]: https://about.codecov.io/sign-up/
237
236
  [codecov docs]: https://docs.codecov.com/docs