anndata 0.11.3__tar.gz → 0.11.4__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 (184) hide show
  1. {anndata-0.11.3 → anndata-0.11.4}/.github/workflows/benchmark.yml +7 -3
  2. {anndata-0.11.3 → anndata-0.11.4}/.github/workflows/codespell.yml +5 -4
  3. {anndata-0.11.3 → anndata-0.11.4}/.github/workflows/publish.yml +3 -0
  4. anndata-0.11.4/.github/workflows/test-cpu.yml +124 -0
  5. {anndata-0.11.3 → anndata-0.11.4}/.github/workflows/test-gpu.yml +14 -8
  6. {anndata-0.11.3 → anndata-0.11.4}/.gitignore +0 -2
  7. {anndata-0.11.3 → anndata-0.11.4}/.pre-commit-config.yaml +9 -9
  8. anndata-0.11.4/.taplo.toml +5 -0
  9. anndata-0.11.4/.vscode/launch.json +26 -0
  10. anndata-0.11.4/.vscode/settings.json +27 -0
  11. {anndata-0.11.3 → anndata-0.11.4}/LICENSE +2 -1
  12. {anndata-0.11.3 → anndata-0.11.4}/PKG-INFO +36 -15
  13. {anndata-0.11.3 → anndata-0.11.4}/README.md +4 -3
  14. {anndata-0.11.3 → anndata-0.11.4}/benchmarks/benchmarks/utils.py +2 -3
  15. anndata-0.11.4/biome.jsonc +18 -0
  16. {anndata-0.11.3 → anndata-0.11.4}/ci/scripts/min-deps.py +3 -1
  17. {anndata-0.11.3 → anndata-0.11.4}/docs/api.md +16 -1
  18. {anndata-0.11.3 → anndata-0.11.4}/docs/conf.py +28 -33
  19. anndata-0.11.4/docs/release-notes/0.11.4.md +14 -0
  20. {anndata-0.11.3 → anndata-0.11.4}/hatch.toml +11 -11
  21. {anndata-0.11.3 → anndata-0.11.4}/pyproject.toml +44 -38
  22. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/__init__.py +2 -12
  23. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/aligned_df.py +2 -1
  24. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/aligned_mapping.py +4 -6
  25. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/anndata.py +154 -89
  26. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/file_backing.py +9 -6
  27. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/index.py +20 -15
  28. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/merge.py +77 -53
  29. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/raw.py +7 -6
  30. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/sparse_dataset.py +33 -30
  31. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/views.py +4 -2
  32. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_io/h5ad.py +23 -19
  33. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_io/read.py +19 -12
  34. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_io/specs/lazy_methods.py +6 -4
  35. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_io/specs/methods.py +71 -28
  36. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_io/specs/registry.py +7 -7
  37. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_io/utils.py +9 -5
  38. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_io/write.py +7 -3
  39. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_io/zarr.py +3 -1
  40. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_settings.py +35 -8
  41. anndata-0.11.4/src/anndata/_version.py +37 -0
  42. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/abc.py +3 -4
  43. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/compat/__init__.py +14 -6
  44. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/experimental/merge.py +29 -25
  45. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/experimental/multi_files/_anncollection.py +8 -4
  46. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/experimental/pytorch/_annloader.py +2 -1
  47. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/io.py +4 -2
  48. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/tests/helpers.py +13 -14
  49. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/typing.py +4 -5
  50. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/utils.py +14 -9
  51. {anndata-0.11.3 → anndata-0.11.4}/src/testing/anndata/_pytest.py +1 -12
  52. anndata-0.11.4/src/testing/anndata/py.typed +0 -0
  53. {anndata-0.11.3 → anndata-0.11.4}/tests/conftest.py +36 -0
  54. {anndata-0.11.3 → anndata-0.11.4}/tests/test_backed_hdf5.py +3 -3
  55. {anndata-0.11.3 → anndata-0.11.4}/tests/test_backed_sparse.py +10 -10
  56. {anndata-0.11.3 → anndata-0.11.4}/tests/test_base.py +22 -1
  57. {anndata-0.11.3 → anndata-0.11.4}/tests/test_concatenate.py +29 -18
  58. {anndata-0.11.3 → anndata-0.11.4}/tests/test_concatenate_disk.py +6 -8
  59. {anndata-0.11.3 → anndata-0.11.4}/tests/test_dask.py +15 -5
  60. {anndata-0.11.3 → anndata-0.11.4}/tests/test_helpers.py +2 -1
  61. {anndata-0.11.3 → anndata-0.11.4}/tests/test_io_conversion.py +3 -2
  62. {anndata-0.11.3 → anndata-0.11.4}/tests/test_io_dispatched.py +7 -7
  63. {anndata-0.11.3 → anndata-0.11.4}/tests/test_io_elementwise.py +28 -9
  64. {anndata-0.11.3 → anndata-0.11.4}/tests/test_layers.py +23 -16
  65. {anndata-0.11.3 → anndata-0.11.4}/tests/test_readwrite.py +30 -20
  66. {anndata-0.11.3 → anndata-0.11.4}/tests/test_settings.py +2 -1
  67. {anndata-0.11.3 → anndata-0.11.4}/tests/test_x.py +9 -3
  68. anndata-0.11.3/.azure-pipelines.yml +0 -129
  69. anndata-0.11.3/src/anndata/_version.py +0 -16
  70. {anndata-0.11.3 → anndata-0.11.4}/.cirun.yml +0 -0
  71. {anndata-0.11.3 → anndata-0.11.4}/.codecov.yml +0 -0
  72. {anndata-0.11.3 → anndata-0.11.4}/.editorconfig +0 -0
  73. {anndata-0.11.3 → anndata-0.11.4}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
  74. {anndata-0.11.3 → anndata-0.11.4}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  75. {anndata-0.11.3 → anndata-0.11.4}/.github/ISSUE_TEMPLATE/enhancement-request.yml +0 -0
  76. {anndata-0.11.3 → anndata-0.11.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  77. {anndata-0.11.3 → anndata-0.11.4}/.github/workflows/check-pr-milestoned.yml +0 -0
  78. {anndata-0.11.3 → anndata-0.11.4}/.github/workflows/close-stale.yml +0 -0
  79. {anndata-0.11.3 → anndata-0.11.4}/.github/workflows/label-stale.yml +0 -0
  80. {anndata-0.11.3 → anndata-0.11.4}/.gitmodules +0 -0
  81. {anndata-0.11.3 → anndata-0.11.4}/.prettierignore +0 -0
  82. {anndata-0.11.3 → anndata-0.11.4}/.prettierrc.yaml +0 -0
  83. {anndata-0.11.3 → anndata-0.11.4}/.readthedocs.yml +0 -0
  84. {anndata-0.11.3 → anndata-0.11.4}/benchmarks/README.md +0 -0
  85. {anndata-0.11.3 → anndata-0.11.4}/benchmarks/asv.conf.json +0 -0
  86. {anndata-0.11.3 → anndata-0.11.4}/benchmarks/benchmarks/__init__.py +0 -0
  87. {anndata-0.11.3 → anndata-0.11.4}/benchmarks/benchmarks/anndata.py +0 -0
  88. {anndata-0.11.3 → anndata-0.11.4}/benchmarks/benchmarks/readwrite.py +0 -0
  89. {anndata-0.11.3 → anndata-0.11.4}/benchmarks/benchmarks/sparse_dataset.py +0 -0
  90. {anndata-0.11.3 → anndata-0.11.4}/ci/constraints.txt +0 -0
  91. {anndata-0.11.3 → anndata-0.11.4}/ci/scripts/towncrier_automation.py +0 -0
  92. {anndata-0.11.3 → anndata-0.11.4}/docs/Makefile +0 -0
  93. {anndata-0.11.3 → anndata-0.11.4}/docs/_key_contributors.rst +0 -0
  94. {anndata-0.11.3 → anndata-0.11.4}/docs/_static/img/anndata_schema.svg +0 -0
  95. {anndata-0.11.3 → anndata-0.11.4}/docs/_templates/autosummary/class.rst +0 -0
  96. {anndata-0.11.3 → anndata-0.11.4}/docs/benchmark-read-write.ipynb +0 -0
  97. {anndata-0.11.3 → anndata-0.11.4}/docs/benchmarks.md +0 -0
  98. {anndata-0.11.3 → anndata-0.11.4}/docs/concatenation.rst +0 -0
  99. {anndata-0.11.3 → anndata-0.11.4}/docs/contributing.md +0 -0
  100. {anndata-0.11.3 → anndata-0.11.4}/docs/extensions/no_skip_abc_members.py +0 -0
  101. {anndata-0.11.3 → anndata-0.11.4}/docs/extensions/patch_myst_cite.py +0 -0
  102. {anndata-0.11.3 → anndata-0.11.4}/docs/fileformat-prose.md +0 -0
  103. {anndata-0.11.3 → anndata-0.11.4}/docs/index.md +0 -0
  104. {anndata-0.11.3 → anndata-0.11.4}/docs/interoperability.md +0 -0
  105. {anndata-0.11.3 → anndata-0.11.4}/docs/news.md +0 -0
  106. {anndata-0.11.3 → anndata-0.11.4}/docs/references.rst +0 -0
  107. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.10.0.md +0 -0
  108. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.10.1.md +0 -0
  109. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.10.2.md +0 -0
  110. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.10.3.md +0 -0
  111. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.10.4.md +0 -0
  112. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.10.5.md +0 -0
  113. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.10.6.md +0 -0
  114. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.10.7.md +0 -0
  115. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.10.8.md +0 -0
  116. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.10.9.md +0 -0
  117. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.11.0.md +0 -0
  118. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.11.1.md +0 -0
  119. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.11.2.md +0 -0
  120. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.11.3.md +0 -0
  121. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.4.0.md +0 -0
  122. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.5.0.md +0 -0
  123. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.6.0.md +0 -0
  124. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.6.x.md +0 -0
  125. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.7.0.md +0 -0
  126. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.7.2.md +0 -0
  127. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.7.3.md +0 -0
  128. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.7.4.md +0 -0
  129. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.7.5.md +0 -0
  130. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.7.6.md +0 -0
  131. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.7.7.md +0 -0
  132. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.7.8.md +0 -0
  133. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.8.0.md +0 -0
  134. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.9.0.md +0 -0
  135. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.9.1.md +0 -0
  136. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/0.9.2.md +0 -0
  137. {anndata-0.11.3 → anndata-0.11.4}/docs/release-notes/index.md +0 -0
  138. {anndata-0.11.3 → anndata-0.11.4}/docs/tutorials/index.md +0 -0
  139. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/__init__.py +0 -0
  140. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/access.py +0 -0
  141. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_core/storage.py +0 -0
  142. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_io/__init__.py +0 -0
  143. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_io/specs/__init__.py +0 -0
  144. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_types.py +0 -0
  145. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/_warnings.py +0 -0
  146. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/compat/exceptiongroups.py +0 -0
  147. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/experimental/__init__.py +0 -0
  148. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/experimental/_dispatch_io.py +0 -0
  149. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/experimental/multi_files/__init__.py +0 -0
  150. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/experimental/pytorch/__init__.py +0 -0
  151. {anndata-0.11.3 → anndata-0.11.4}/src/anndata/logging.py +0 -0
  152. {anndata-0.11.3/src/testing/anndata → anndata-0.11.4/src/anndata/tests}/__init__.py +0 -0
  153. /anndata-0.11.3/src/testing/anndata/py.typed → /anndata-0.11.4/src/testing/anndata/__init__.py +0 -0
  154. {anndata-0.11.3 → anndata-0.11.4}/tests/data/adata-comments.tsv +0 -0
  155. {anndata-0.11.3 → anndata-0.11.4}/tests/data/adata.csv +0 -0
  156. {anndata-0.11.3 → anndata-0.11.4}/tests/data/archives/readme.md +0 -0
  157. {anndata-0.11.3 → anndata-0.11.4}/tests/data/archives/v0.7.0/adata.h5ad +0 -0
  158. {anndata-0.11.3 → anndata-0.11.4}/tests/data/archives/v0.7.0/adata.zarr.zip +0 -0
  159. {anndata-0.11.3 → anndata-0.11.4}/tests/data/archives/v0.7.8/adata.h5ad +0 -0
  160. {anndata-0.11.3 → anndata-0.11.4}/tests/data/archives/v0.7.8/adata.zarr.zip +0 -0
  161. {anndata-0.11.3 → anndata-0.11.4}/tests/data/excel.xlsx +0 -0
  162. {anndata-0.11.3 → anndata-0.11.4}/tests/data/umi_tools.tsv.gz +0 -0
  163. {anndata-0.11.3 → anndata-0.11.4}/tests/test_anncollection.py +0 -0
  164. {anndata-0.11.3 → anndata-0.11.4}/tests/test_annot.py +0 -0
  165. {anndata-0.11.3 → anndata-0.11.4}/tests/test_awkward.py +0 -0
  166. {anndata-0.11.3 → anndata-0.11.4}/tests/test_backed_dense.py +0 -0
  167. {anndata-0.11.3 → anndata-0.11.4}/tests/test_dask_view_mem.py +0 -0
  168. {anndata-0.11.3 → anndata-0.11.4}/tests/test_deprecations.py +0 -0
  169. {anndata-0.11.3 → anndata-0.11.4}/tests/test_get_vector.py +0 -0
  170. {anndata-0.11.3 → anndata-0.11.4}/tests/test_gpu.py +0 -0
  171. {anndata-0.11.3 → anndata-0.11.4}/tests/test_inplace_subset.py +0 -0
  172. {anndata-0.11.3 → anndata-0.11.4}/tests/test_io_backwards_compat.py +0 -0
  173. {anndata-0.11.3 → anndata-0.11.4}/tests/test_io_partial.py +0 -0
  174. {anndata-0.11.3 → anndata-0.11.4}/tests/test_io_utils.py +0 -0
  175. {anndata-0.11.3 → anndata-0.11.4}/tests/test_io_warnings.py +0 -0
  176. {anndata-0.11.3 → anndata-0.11.4}/tests/test_obsmvarm.py +0 -0
  177. {anndata-0.11.3 → anndata-0.11.4}/tests/test_obspvarp.py +0 -0
  178. {anndata-0.11.3 → anndata-0.11.4}/tests/test_raw.py +0 -0
  179. {anndata-0.11.3 → anndata-0.11.4}/tests/test_repr.py +0 -0
  180. {anndata-0.11.3 → anndata-0.11.4}/tests/test_structured_arrays.py +0 -0
  181. {anndata-0.11.3 → anndata-0.11.4}/tests/test_transpose.py +0 -0
  182. {anndata-0.11.3 → anndata-0.11.4}/tests/test_uns.py +0 -0
  183. {anndata-0.11.3 → anndata-0.11.4}/tests/test_utils.py +0 -0
  184. {anndata-0.11.3 → anndata-0.11.4}/tests/test_views.py +0 -0
@@ -6,12 +6,16 @@ on:
6
6
  pull_request:
7
7
  branches: [main]
8
8
 
9
+ env:
10
+ FORCE_COLOR: "1"
11
+
12
+ defaults:
13
+ run:
14
+ shell: bash -el {0}
15
+
9
16
  jobs:
10
17
  benchmark:
11
18
  runs-on: ${{ matrix.os }}
12
- defaults:
13
- run:
14
- shell: bash -el {0} # -e to fail on error, -l for mamba
15
19
 
16
20
  strategy:
17
21
  fail-fast: false
@@ -16,7 +16,8 @@ jobs:
16
16
  runs-on: ubuntu-latest
17
17
 
18
18
  steps:
19
- - name: Checkout
20
- uses: actions/checkout@v4
21
- - name: Codespell
22
- uses: codespell-project/actions-codespell@v2
19
+ - uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+ filter: blob:none
23
+ - uses: codespell-project/actions-codespell@v2
@@ -12,6 +12,9 @@ jobs:
12
12
  id-token: write # to authenticate as Trusted Publisher to pypi.org
13
13
  steps:
14
14
  - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+ filter: blob:none
15
18
  - uses: actions/setup-python@v5
16
19
  with:
17
20
  python-version: "3.x"
@@ -0,0 +1,124 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - "[0-9]+.[0-9]+.x"
8
+ pull_request:
9
+
10
+ env:
11
+ PYTEST_ADDOPTS: "-v --color=yes"
12
+ FORCE_COLOR: "1"
13
+
14
+ defaults:
15
+ run:
16
+ shell: bash -el {0}
17
+
18
+ # Cancel the job if new commits are pushed
19
+ # https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre
20
+ concurrency:
21
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22
+ cancel-in-progress: true
23
+
24
+ jobs:
25
+ pytest:
26
+ runs-on: ubuntu-latest
27
+ strategy:
28
+ matrix:
29
+ include:
30
+ - python-version: '3.12'
31
+ test-type: coverage
32
+ - python-version: '3.10'
33
+ test-type: standard
34
+ - python-version: '3.12'
35
+ dependencies-version: pre-release
36
+ test-type: strict-warning
37
+ - python-version: '3.10'
38
+ dependencies-version: minimum
39
+ test-type: coverage
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ with:
43
+ fetch-depth: 0
44
+ filter: blob:none
45
+
46
+ - name: Set up Python ${{ matrix.python-version }}
47
+ uses: actions/setup-python@v5
48
+ with:
49
+ python-version: ${{ matrix.python-version }}
50
+
51
+ - name: Install UV
52
+ uses: astral-sh/setup-uv@v5
53
+ with:
54
+ enable-cache: true
55
+ cache-dependency-glob: pyproject.toml
56
+
57
+ - name: Install dependencies
58
+ if: matrix.dependencies-version == null
59
+ run: uv pip install --system --compile "anndata[dev,test] @ ." -c ci/constraints.txt
60
+
61
+ - name: Install minimum dependencies
62
+ if: matrix.dependencies-version == 'minimum'
63
+ run: |
64
+ uv pip install --system --compile tomli packaging
65
+
66
+ deps=$(python3 ci/scripts/min-deps.py pyproject.toml --extra dev test)
67
+ uv pip install --system --compile $deps "anndata @ ."
68
+
69
+ - name: Install dependencies release candidates
70
+ if: matrix.dependencies-version == 'pre-release'
71
+ run: uv pip install -v --system --compile --pre "anndata[dev,test] @ ." -c ci/constraints.txt
72
+
73
+ - name: Display installed versions
74
+ run: uv pip list
75
+
76
+ - name: Run Pytest
77
+ if: matrix.test-type == 'standard'
78
+ run: pytest -n auto
79
+
80
+ - name: Run Pytest (coverage)
81
+ if: matrix.test-type == 'coverage'
82
+ run: coverage run -m pytest -n auto --cov --cov-report=xml
83
+
84
+ - name: Run Pytest (treat warnings as errors)
85
+ if: matrix.test-type == 'strict-warning'
86
+ run: pytest --strict-warnings -n auto
87
+
88
+ - uses: codecov/codecov-action@v4
89
+ if: matrix.test-type == 'coverage'
90
+ with:
91
+ token: ${{ secrets.CODECOV_TOKEN }}
92
+ fail_ci_if_error: true
93
+ files: test-data/coverage.xml
94
+
95
+ check-build:
96
+ runs-on: ubuntu-22.04
97
+ steps:
98
+ - uses: actions/checkout@v4
99
+ with:
100
+ fetch-depth: 0
101
+ filter: blob:none
102
+
103
+ - name: Set up Python 3.12
104
+ uses: actions/setup-python@v5
105
+ with:
106
+ python-version: '3.12'
107
+
108
+ - name: Install build tools and requirements
109
+ run: |
110
+ python -m pip install --upgrade pip
111
+ pip install build twine
112
+
113
+ - name: Display installed versions
114
+ run: pip list
115
+
116
+ - name: Build & Twine check
117
+ run: |
118
+ python -m build --sdist --wheel .
119
+ twine check dist/*
120
+
121
+ - name: Check runtime version
122
+ run: |
123
+ pip install dist/*.whl
124
+ python -c 'import anndata; print(anndata.__version__)'
@@ -9,6 +9,14 @@ on:
9
9
  - opened
10
10
  - synchronize
11
11
 
12
+ env:
13
+ PYTEST_ADDOPTS: "-v --color=yes"
14
+ FORCE_COLOR: "1"
15
+
16
+ defaults:
17
+ run:
18
+ shell: bash -el {0}
19
+
12
20
  # Cancel the job if new commits are pushed
13
21
  # https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre
14
22
  concurrency:
@@ -39,14 +47,11 @@ jobs:
39
47
  # At time of writing, a typical run takes about 5 minutes
40
48
  timeout-minutes: 30
41
49
 
42
- defaults:
43
- run:
44
- shell: bash -el {0}
45
-
46
50
  steps:
47
51
  - uses: actions/checkout@v4
48
52
  with:
49
53
  fetch-depth: 0
54
+ filter: blob:none
50
55
 
51
56
  - name: Nvidia SMI sanity check
52
57
  run: nvidia-smi
@@ -67,9 +72,10 @@ jobs:
67
72
  python-version: ${{ env.max_python_version }}
68
73
 
69
74
  - name: Install UV
70
- uses: hynek/setup-cached-uv@v2
75
+ uses: astral-sh/setup-uv@v5
71
76
  with:
72
- cache-dependency-path: pyproject.toml
77
+ enable-cache: true
78
+ cache-dependency-glob: pyproject.toml
73
79
 
74
80
  - name: Install AnnData
75
81
  run: uv pip install --system -e ".[dev,test,cu12]" -c ci/constraints.txt
@@ -78,13 +84,13 @@ jobs:
78
84
  run: pip list
79
85
 
80
86
  - name: Run test
81
- run: pytest -m gpu --cov --cov-report=xml --cov-context=test
87
+ run: coverage run -m pytest -m gpu -n auto --cov --cov-report=xml
82
88
 
83
89
  - uses: codecov/codecov-action@v4
84
90
  with:
85
91
  token: ${{ secrets.CODECOV_TOKEN }}
86
92
  fail_ci_if_error: true
87
- verbose: true
93
+ files: test-data/coverage.xml
88
94
 
89
95
  - name: Remove 'run-gpu-ci' Label
90
96
  if: always()
@@ -11,7 +11,6 @@ __pycache__/
11
11
  # Distribution / packaging
12
12
  /dist/
13
13
  /ci/min-deps.txt
14
- /src/anndata/_version.py
15
14
  /requirements*.lock
16
15
  /.python-version
17
16
 
@@ -28,7 +27,6 @@ __pycache__/
28
27
 
29
28
  # IDEs
30
29
  /.idea/
31
- /.vscode/
32
30
 
33
31
  # Benchmark
34
32
  .asv
@@ -1,18 +1,18 @@
1
1
  repos:
2
2
  - repo: https://github.com/astral-sh/ruff-pre-commit
3
- rev: v0.8.1
3
+ rev: v0.11.2
4
4
  hooks:
5
5
  - id: ruff
6
- types_or: [python, pyi, jupyter]
7
6
  args: ["--fix"]
8
7
  - id: ruff-format
9
- types_or: [python, pyi, jupyter]
10
- - repo: https://github.com/pre-commit/mirrors-prettier
11
- rev: v4.0.0-alpha.8
8
+ - repo: https://github.com/biomejs/pre-commit
9
+ rev: v1.9.4
12
10
  hooks:
13
- - id: prettier
14
- exclude_types:
15
- - markdown
11
+ - id: biome-format
12
+ - repo: https://github.com/ComPWA/taplo-pre-commit
13
+ rev: v0.9.3
14
+ hooks:
15
+ - id: taplo-format
16
16
  - repo: https://github.com/pre-commit/pre-commit-hooks
17
17
  rev: v5.0.0
18
18
  hooks:
@@ -27,7 +27,7 @@ repos:
27
27
  - id: no-commit-to-branch
28
28
  args: ["--branch=main"]
29
29
  - repo: https://github.com/codespell-project/codespell
30
- rev: v2.3.0
30
+ rev: v2.4.1
31
31
  hooks:
32
32
  - id: codespell
33
33
  additional_dependencies:
@@ -0,0 +1,5 @@
1
+ [formatting]
2
+ array_auto_collapse = false
3
+ column_width = 120
4
+ compact_arrays = false
5
+ indent_string = ' '
@@ -0,0 +1,26 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Python: Build Docs",
6
+ "type": "debugpy",
7
+ "request": "launch",
8
+ "module": "sphinx",
9
+ "args": ["-M", "html", ".", "_build"],
10
+ "cwd": "${workspaceFolder}/docs",
11
+ "console": "internalConsole",
12
+ "justMyCode": false,
13
+ },
14
+ {
15
+ "name": "Python: Debug Test",
16
+ "type": "debugpy",
17
+ "request": "launch",
18
+ "program": "${file}",
19
+ "purpose": ["debug-test"],
20
+ "console": "internalConsole",
21
+ "justMyCode": false,
22
+ "env": { "PYTEST_ADDOPTS": "--color=yes" },
23
+ "presentation": { "hidden": true },
24
+ },
25
+ ],
26
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "[python][toml][json][jsonc]": {
3
+ "editor.formatOnSave": true,
4
+ "editor.codeActionsOnSave": {
5
+ "source.organizeImports": "explicit",
6
+ "source.fixAll": "explicit",
7
+ },
8
+ },
9
+ "[python]": {
10
+ "editor.defaultFormatter": "charliermarsh.ruff",
11
+ },
12
+ "[toml]": {
13
+ "editor.defaultFormatter": "tamasfe.even-better-toml",
14
+ },
15
+ "[json][jsonc]": {
16
+ "editor.defaultFormatter": "biomejs.biome",
17
+ },
18
+ "python.analysis.typeCheckingMode": "basic",
19
+ "python.testing.pytestEnabled": true,
20
+ "python.testing.pytestArgs": [
21
+ "--color=yes",
22
+ "-vv",
23
+ "--strict-warnings",
24
+ //"-nauto",
25
+ ],
26
+ "python.terminal.activateEnvironment": true,
27
+ }
@@ -1,6 +1,7 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2017-2018 P. Angerer, F. Alexander Wolf, Theis Lab
3
+ Copyright (c) 2025, scverse
4
+ Copyright (c) 2017-2018, P. Angerer, F. Alexander Wolf, Theis Lab
4
5
  All rights reserved.
5
6
 
6
7
  Redistribution and use in source and binary forms, with or without
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anndata
3
- Version: 0.11.3
3
+ Version: 0.11.4
4
4
  Summary: Annotated data.
5
5
  Project-URL: Documentation, https://anndata.readthedocs.io/
6
6
  Project-URL: Source, https://github.com/scverse/anndata
7
7
  Project-URL: Home-page, https://github.com/scverse/anndata
8
8
  Author: Philipp Angerer, Alex Wolf, Isaac Virshup, Sergei Rybakov
9
- Maintainer-email: Isaac Virshup <ivirshup@gmail.com>, Philipp Angerer <philipp.angerer@helmholtz-munich.de>, Alex Wolf <f.alex.wolf@gmx.de>
9
+ Maintainer-email: Isaac Virshup <ivirshup@gmail.com>, Philipp Angerer <philipp.angerer@helmholtz-munich.de>, Ilan Gold <ilan.gold@helmholtz-munich.de>
10
10
  License-Expression: BSD-3-Clause
11
11
  License-File: LICENSE
12
12
  Classifier: Environment :: Console
@@ -29,7 +29,7 @@ Requires-Dist: exceptiongroup; python_version < '3.11'
29
29
  Requires-Dist: h5py>=3.7
30
30
  Requires-Dist: natsort
31
31
  Requires-Dist: numpy>=1.23
32
- Requires-Dist: packaging>=20.0
32
+ Requires-Dist: packaging>=24.2
33
33
  Requires-Dist: pandas!=2.1.0rc0,!=2.1.2,>=1.4
34
34
  Requires-Dist: scipy>1.8
35
35
  Provides-Extra: cu11
@@ -37,29 +37,46 @@ Requires-Dist: cupy-cuda11x; extra == 'cu11'
37
37
  Provides-Extra: cu12
38
38
  Requires-Dist: cupy-cuda12x; extra == 'cu12'
39
39
  Provides-Extra: dask
40
- Requires-Dist: dask[array]!=2024.8.*,!=2024.9.*,>=2022.09.2; extra == 'dask'
40
+ Requires-Dist: dask[array]!=2024.8.*,!=2024.9.*,<2025.2.0,>=2022.09.2; extra == 'dask'
41
41
  Provides-Extra: dev
42
- Requires-Dist: pytest-xdist; extra == 'dev'
43
- Requires-Dist: setuptools-scm; extra == 'dev'
42
+ Requires-Dist: awkward>=2.3; extra == 'dev'
43
+ Requires-Dist: boltons; extra == 'dev'
44
+ Requires-Dist: dask[array]!=2024.8.*,!=2024.9.*,<2025.2.0,>=2022.09.2; extra == 'dev'
45
+ Requires-Dist: dask[distributed]; extra == 'dev'
46
+ Requires-Dist: filelock; extra == 'dev'
47
+ Requires-Dist: hatch-vcs; extra == 'dev'
48
+ Requires-Dist: httpx; extra == 'dev'
49
+ Requires-Dist: joblib; extra == 'dev'
50
+ Requires-Dist: loompy>=3.0.5; extra == 'dev'
51
+ Requires-Dist: matplotlib; extra == 'dev'
52
+ Requires-Dist: openpyxl; extra == 'dev'
53
+ Requires-Dist: pyarrow; extra == 'dev'
54
+ Requires-Dist: pytest-cov>=2.10; extra == 'dev'
55
+ Requires-Dist: pytest-memray; extra == 'dev'
56
+ Requires-Dist: pytest-mock; extra == 'dev'
57
+ Requires-Dist: pytest-randomly; extra == 'dev'
58
+ Requires-Dist: pytest-xdist[psutil]; extra == 'dev'
59
+ Requires-Dist: pytest<8.3.4,>=8.2; extra == 'dev'
60
+ Requires-Dist: scanpy>=1.9.8; extra == 'dev'
61
+ Requires-Dist: scikit-learn; extra == 'dev'
44
62
  Requires-Dist: towncrier>=24.8.0; extra == 'dev'
63
+ Requires-Dist: zarr<3; extra == 'dev'
45
64
  Provides-Extra: dev-doc
46
65
  Requires-Dist: towncrier>=24.8.0; extra == 'dev-doc'
47
- Provides-Extra: dev-test
48
- Requires-Dist: pytest-xdist; extra == 'dev-test'
49
66
  Provides-Extra: doc
50
67
  Requires-Dist: awkward>=2.3; extra == 'doc'
51
68
  Requires-Dist: ipython; extra == 'doc'
69
+ Requires-Dist: myst-nb; extra == 'doc'
52
70
  Requires-Dist: myst-parser; extra == 'doc'
53
- Requires-Dist: nbsphinx; extra == 'doc'
54
71
  Requires-Dist: readthedocs-sphinx-search; extra == 'doc'
55
- Requires-Dist: scanpydoc[theme,typehints]>=0.14.1; extra == 'doc'
72
+ Requires-Dist: scanpydoc[theme,typehints]>=0.15.1; extra == 'doc'
56
73
  Requires-Dist: sphinx-autodoc-typehints>=2.2.0; extra == 'doc'
57
74
  Requires-Dist: sphinx-book-theme>=1.1.0; extra == 'doc'
58
75
  Requires-Dist: sphinx-copybutton; extra == 'doc'
59
76
  Requires-Dist: sphinx-design>=0.5.0; extra == 'doc'
60
77
  Requires-Dist: sphinx-issues; extra == 'doc'
61
78
  Requires-Dist: sphinx-toolbox>=3.8.0; extra == 'doc'
62
- Requires-Dist: sphinx>=7.4.6; extra == 'doc'
79
+ Requires-Dist: sphinx>=8.2.1; extra == 'doc'
63
80
  Requires-Dist: sphinxext-opengraph; extra == 'doc'
64
81
  Requires-Dist: towncrier>=24.8.0; extra == 'doc'
65
82
  Requires-Dist: zarr<3; extra == 'doc'
@@ -68,8 +85,9 @@ Requires-Dist: cupy; extra == 'gpu'
68
85
  Provides-Extra: test
69
86
  Requires-Dist: awkward>=2.3; extra == 'test'
70
87
  Requires-Dist: boltons; extra == 'test'
71
- Requires-Dist: dask[array]!=2024.8.*,!=2024.9.*,>=2022.09.2; extra == 'test'
88
+ Requires-Dist: dask[array]!=2024.8.*,!=2024.9.*,<2025.2.0,>=2022.09.2; extra == 'test'
72
89
  Requires-Dist: dask[distributed]; extra == 'test'
90
+ Requires-Dist: filelock; extra == 'test'
73
91
  Requires-Dist: httpx; extra == 'test'
74
92
  Requires-Dist: joblib; extra == 'test'
75
93
  Requires-Dist: loompy>=3.0.5; extra == 'test'
@@ -79,6 +97,8 @@ Requires-Dist: pyarrow; extra == 'test'
79
97
  Requires-Dist: pytest-cov>=2.10; extra == 'test'
80
98
  Requires-Dist: pytest-memray; extra == 'test'
81
99
  Requires-Dist: pytest-mock; extra == 'test'
100
+ Requires-Dist: pytest-randomly; extra == 'test'
101
+ Requires-Dist: pytest-xdist[psutil]; extra == 'test'
82
102
  Requires-Dist: pytest<8.3.4,>=8.2; extra == 'test'
83
103
  Requires-Dist: scanpy>=1.9.8; extra == 'test'
84
104
  Requires-Dist: scikit-learn; extra == 'test'
@@ -112,16 +132,17 @@ anndata is a Python package for handling annotated data matrices in memory and o
112
132
 
113
133
  [//]: # (numfocus-fiscal-sponsor-attribution)
114
134
 
115
- anndata 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
- 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.
117
-
135
+ anndata 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/).
136
+ 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.
118
137
 
138
+ <div align="center">
119
139
  <a href="https://numfocus.org/project/scverse">
120
140
  <img
121
141
  src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
122
142
  width="200"
123
143
  >
124
144
  </a>
145
+ </div>
125
146
 
126
147
  ## Public API
127
148
 
@@ -25,16 +25,17 @@ anndata is a Python package for handling annotated data matrices in memory and o
25
25
 
26
26
  [//]: # (numfocus-fiscal-sponsor-attribution)
27
27
 
28
- anndata 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/).
29
- 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.
30
-
28
+ anndata 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/).
29
+ 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.
31
30
 
31
+ <div align="center">
32
32
  <a href="https://numfocus.org/project/scverse">
33
33
  <img
34
34
  src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
35
35
  width="200"
36
36
  >
37
37
  </a>
38
+ </div>
38
39
 
39
40
  ## Public API
40
41
 
@@ -63,9 +63,8 @@ def gen_indexer(adata, dim, index_kind, ratio):
63
63
  index_kinds = {"slice", "intarray", "boolarray", "strarray"}
64
64
 
65
65
  if index_kind not in index_kinds:
66
- raise ValueError(
67
- f"Argument 'index_kind' must be one of {index_kinds}. Was {index_kind}."
68
- )
66
+ msg = f"Argument 'index_kind' must be one of {index_kinds}. Was {index_kind}."
67
+ raise ValueError(msg)
69
68
 
70
69
  axis = dimnames.index(dim)
71
70
  subset = [slice(None), slice(None)]
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3
+ "formatter": { "useEditorconfig": true },
4
+ "overrides": [
5
+ {
6
+ "include": ["./.vscode/*.json", "**/*.jsonc", "**/asv.conf.json"],
7
+ "json": {
8
+ "formatter": {
9
+ "trailingCommas": "all",
10
+ },
11
+ "parser": {
12
+ "allowComments": true,
13
+ "allowTrailingCommas": true,
14
+ },
15
+ },
16
+ },
17
+ ],
18
+ }
@@ -71,7 +71,9 @@ def extract_min_deps(
71
71
 
72
72
  # If we are referring to other optional dependency lists, resolve them
73
73
  if req.name == project_name:
74
- assert req.extras, f"Project included itself as dependency, without specifying extras: {req}"
74
+ assert req.extras, (
75
+ f"Project included itself as dependency, without specifying extras: {req}"
76
+ )
75
77
  for extra in req.extras:
76
78
  extra_deps = pyproject["project"]["optional-dependencies"][extra]
77
79
  dependencies += map(Requirement, extra_deps)
@@ -69,13 +69,28 @@ You might have more success by assembling the {class}`AnnData` object yourself f
69
69
  ## Writing
70
70
 
71
71
  Writing a complete {class}`AnnData` object to disk in anndata’s native formats `.h5ad` and `zarr`.
72
+ (These functions are also exported as {func}`io.write_h5ad` and {func}`io.write_zarr`.)
72
73
 
73
74
  ```{eval-rst}
74
75
  .. autosummary::
75
76
  :toctree: generated/
76
77
 
77
- AnnData.write
78
+ AnnData.write_h5ad
78
79
  AnnData.write_zarr
80
+
81
+
82
+ ..
83
+ .. autosummary::
84
+ :toctree: generated/
85
+
86
+ io.write_h5ad
87
+ io.write_zarr
88
+
89
+ .. toctree::
90
+ :hidden:
91
+
92
+ generated/anndata.io.write_h5ad
93
+ generated/anndata.io.write_zarr
79
94
  ```
80
95
 
81
96
  Writing individual portions ({attr}`~AnnData.obs`, {attr}`~AnnData.varm` etc.) of the {class}`AnnData` object.