Skip to content

Commit a607798

Browse files
flying-sheepmeeseeksmachine
authored andcommitted
Backport PR scverse#3959: ci: write zarr 3 format with supported anndata versions
1 parent d337b40 commit a607798

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

hatch.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ dependency-groups = [ "dev" ]
44

55
[envs.docs]
66
dependency-groups = [ "doc" ]
7-
extra-dependencies = [ "pandas>=3" ]
7+
# MyST-NB 1.3.0 spams the doc build logs making debugging hard, so use https://github.com/executablebooks/MyST-NB/pull/704
8+
extra-dependencies = [
9+
"pandas>=3",
10+
"myst-nb @ git+https://github.com/executablebooks/MyST-NB.git@91273a686c66fd0383466c80eede61b208d7e426",
11+
]
812
scripts.build = "sphinx-build -M html docs docs/_build -W {args}"
913
scripts.open = "python3 -m webbrowser -t docs/_build/html/index.html"
1014
scripts.clean = "git clean -fdX -- {args:docs}"

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ test = [
111111
"scanpy[plotting]",
112112
]
113113
doc = [
114-
"sphinx>=8.2.3",
114+
"sphinx>=9.1.0",
115115
"sphinx-book-theme>=1.1.0",
116116
"scanpydoc>=0.16.1",
117117
"sphinx-autodoc-typehints>=1.25.2",
@@ -198,6 +198,8 @@ filterwarnings = [
198198
"ignore:.*'(parseAll)'.*'(parse_all)':DeprecationWarning",
199199
# igraph vs leidenalg warning
200200
"ignore:The `igraph` implementation of leiden clustering:UserWarning",
201+
# everybody uses this zarr 3 feature, including us, XArray, lots of data out there …
202+
"ignore:Consolidated metadata is currently not part:UserWarning",
201203
]
202204

203205
[tool.coverage.run]

src/testing/scanpy/_pytest/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import TYPE_CHECKING
99

1010
import pytest
11+
from packaging.version import Version
1112

1213
from .fixtures import * # noqa: F403
1314
from .marks import needs
@@ -28,17 +29,21 @@ def original_settings(
2829
) -> Generator[Mapping[str, object], None, None]:
2930
"""Switch to agg backend, reset settings, and close all figures at teardown."""
3031
# make sure seaborn is imported and did its thing
32+
import anndata as ad
3133
import seaborn as sns # noqa: F401
3234
from matplotlib import pyplot as plt
3335
from matplotlib.testing import setup
3436

3537
import scanpy as sc
38+
from scanpy._compat import pkg_version
3639

3740
global _original_settings # noqa: PLW0603
3841
if _original_settings is None:
3942
_original_settings = MappingProxyType(sc.settings.__dict__.copy())
4043

4144
setup()
45+
if pkg_version("anndata") >= Version("0.12"):
46+
ad.settings.zarr_write_format = 3 # default in anndata 0.13, warns otherwise
4247
sc.settings.logfile = sys.stderr
4348
sc.settings.verbosity = "hint"
4449
sc.settings.autoshow = True

0 commit comments

Comments
 (0)