diff --git a/.readthedocs.yml b/.readthedocs.yml index 0e192dc64d..534da7afc8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,9 +1,9 @@ # https://docs.readthedocs.io/en/stable/config-file/v2.html version: 2 build: - os: ubuntu-24.04 + os: ubuntu-26.04 tools: - python: '3.13' + python: '3.14' jobs: post_checkout: # unshallow so version can be derived from tag @@ -17,5 +17,5 @@ build: - ( find docs/release-notes -regex '[^.]+[.][^.]+.md' | grep -q . ) && uvx hatch run towncrier build --keep || true build: html: - - uvx hatch run docs:build -T + - uvx --from=hatch!=1.18.0 hatch run docs:build -T - mv docs/_build $READTHEDOCS_OUTPUT diff --git a/docs/conf.py b/docs/conf.py index 26bda3c8b8..2b88b5b724 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -279,6 +279,7 @@ def setup(app: Sphinx) -> None: # Technical issues ("py:class", "numpy.int64"), # documented as “attribute” ("py:class", "numpy._typing._dtype_like._SupportsDType"), + ("py:obj", "numpy._typing._dtype_like._SupportsDType"), ("py:class", "numpy._typing._dtype_like._DTypeDict"), # Will probably be documented ("py:class", "scanpy.neighbors.OnFlySymMatrix"), diff --git a/pyproject.toml b/pyproject.toml index f16f5092e5..32801799f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,7 +123,6 @@ docs = [ "nbsphinx>=0.9", "numpy>=2.4", # type aliases "plotly", - "sam-algorithm", # TODO: remove necessity for being able to import doc-linked classes "scanpy[dask-ml,leiden,paga,plotting,scanpy2,scrublet]", "scanpydoc>=0.16.1", diff --git a/src/scanpy/external/tl/_sam.py b/src/scanpy/external/tl/_sam.py index 77b0c7dc73..ea2b8fc94e 100644 --- a/src/scanpy/external/tl/_sam.py +++ b/src/scanpy/external/tl/_sam.py @@ -11,7 +11,11 @@ from typing import Literal from anndata import AnnData - from samalg import SAM + + try: + from samalg import SAM + except ImportError: + SAM = type("SAM", (), dict(__module__="samalg")) @doctest_needs("samalg") diff --git a/src/testing/scanpy/_pytest/marks.py b/src/testing/scanpy/_pytest/marks.py index 076ab92432..06bd51fb31 100644 --- a/src/testing/scanpy/_pytest/marks.py +++ b/src/testing/scanpy/_pytest/marks.py @@ -87,7 +87,7 @@ def _generate_next_value_( phate = auto() phenograph = auto() pypairs = auto() - samalg = "sam-algorithm" + samalg = "sc-sam" scanorama = auto() trimap = auto() wishbone = "wishbone-dev"