From ff691713028c45a1ae3aebbd91662070ea14abe1 Mon Sep 17 00:00:00 2001 From: Phil Schaf Date: Thu, 13 Aug 2026 13:38:57 +0200 Subject: [PATCH 1/2] docs: use working hatch version --- .readthedocs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From 74681a83decf42e6b8960b345fb3a5dd56074494 Mon Sep 17 00:00:00 2001 From: Phil Schaf Date: Thu, 13 Aug 2026 14:04:12 +0200 Subject: [PATCH 2/2] =?UTF-8?q?don=E2=80=98t=20install=20SAM=20anymore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/conf.py | 1 + pyproject.toml | 1 - src/scanpy/external/tl/_sam.py | 6 +++++- src/testing/scanpy/_pytest/marks.py | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) 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"