Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ dependency-groups = [ "dev" ]

[envs.docs]
dependency-groups = [ "doc" ]
extra-dependencies = [ "pandas>=3" ]
# MyST-NB 1.3.0 spams the doc build logs making debugging hard, so use https://github.com/executablebooks/MyST-NB/pull/704
extra-dependencies = [
"pandas>=3",
"myst-nb @ git+https://github.com/executablebooks/MyST-NB.git@91273a686c66fd0383466c80eede61b208d7e426",
]
scripts.build = "sphinx-build -M html docs docs/_build -W {args}"
scripts.open = "python3 -m webbrowser -t docs/_build/html/index.html"
scripts.clean = "git clean -fdX -- {args:docs}"
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ test = [
"scanpy[plotting]",
]
doc = [
"sphinx>=8.2.3",
"sphinx>=9.1.0",
"sphinx-book-theme>=1.1.0",
"scanpydoc>=0.16.1",
"sphinx-autodoc-typehints>=1.25.2",
Expand Down Expand Up @@ -198,6 +198,8 @@ filterwarnings = [
"ignore:.*'(parseAll)'.*'(parse_all)':DeprecationWarning",
# igraph vs leidenalg warning
"ignore:The `igraph` implementation of leiden clustering:UserWarning",
# everybody uses this zarr 3 feature, including us, XArray, lots of data out there …
"ignore:Consolidated metadata is currently not part:UserWarning",
]

[tool.coverage.run]
Expand Down
5 changes: 5 additions & 0 deletions src/testing/scanpy/_pytest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import TYPE_CHECKING

import pytest
from packaging.version import Version

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

import scanpy as sc
from scanpy._compat import pkg_version

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

setup()
if pkg_version("anndata") >= Version("0.12"):
ad.settings.zarr_write_format = 3 # default in anndata 0.13, warns otherwise
sc.settings.logfile = sys.stderr
sc.settings.verbosity = "hint"
sc.settings.autoshow = True
Expand Down
Loading