From 575054e0419da2dc4f0f4d1a372ed2f4eea5a133 Mon Sep 17 00:00:00 2001 From: LucaMarconato <2664412+LucaMarconato@users.noreply.github.com> Date: Sun, 9 Nov 2025 12:01:35 +0100 Subject: [PATCH 01/12] bump mins: python, spatialdata, dask --- .github/workflows/test.yml | 2 +- setup.cfg | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 65417e17..9a5fe605 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: platform: [ubuntu-latest, macos-latest] # [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.10", "3.12"] + python-version: ["3.11", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/setup.cfg b/setup.cfg index 9097cf86..01466069 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,9 +20,9 @@ classifiers = Topic :: Software Development :: Testing Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Operating System :: OS Independent License :: OSI Approved :: BSD License @@ -30,14 +30,14 @@ classifiers = [options] packages = find: include_package_data = True -python_requires = >=3.10 +python_requires = >=3.11 setup_requires = setuptools_scm # add your package requirements here install_requires = anndata click cycler - dask>=2024.4.1,<=2024.11.2 + dask>=2025.0.2 geopandas loguru matplotlib @@ -54,7 +54,7 @@ install_requires = scipy shapely scikit-learn - spatialdata>=0.2.6 + spatialdata>=0.6.0 superqt typing_extensions>=4.8.0 vispy From f28f4f27a909949a159c7cc1e0a7f2d6576e1299 Mon Sep 17 00:00:00 2001 From: LucaMarconato <2664412+LucaMarconato@users.noreply.github.com> Date: Thu, 1 Jan 2026 14:09:52 +0100 Subject: [PATCH 02/12] fix min dask --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 01466069..3fce035b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,7 +37,7 @@ install_requires = anndata click cycler - dask>=2025.0.2 + dask>=2025.2.0 geopandas loguru matplotlib @@ -54,7 +54,7 @@ install_requires = scipy shapely scikit-learn - spatialdata>=0.6.0 + spatialdata>=0.6.1 superqt typing_extensions>=4.8.0 vispy From 588ceac06752d7d9044be5a73586c64cfff6b819 Mon Sep 17 00:00:00 2001 From: LucaMarconato <2664412+LucaMarconato@users.noreply.github.com> Date: Thu, 1 Jan 2026 14:38:20 +0100 Subject: [PATCH 03/12] bump napari-matplotlib, bump python mins --- .github/workflows/benchmarks.yml | 2 +- .readthedocs.yaml | 2 +- setup.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 90906ba6..a5479b24 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -140,7 +140,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PLATFORM: ${{ matrix.runs-on }} - PYTHON: "3.9" + PYTHON: "3.11" BACKEND: ${{ matrix.benchmark-name }} RUN_ID: ${{ github.run_id }} TITLE: "[test-bot] Benchmark tests failing" diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c8338e13..c26eaa19 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.10" + python: "3.11" sphinx: configuration: docs/conf.py fail_on_warning: false diff --git a/setup.cfg b/setup.cfg index 3fce035b..c74fbc05 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,7 +42,7 @@ install_requires = loguru matplotlib napari>=0.6.2 - napari-matplotlib + napari-matplotlib>=3.0.2 numba numpy packaging From 615b3d0eea60727c4d6c4e55729b7e49e5aade44 Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Thu, 1 Jan 2026 16:38:43 +0100 Subject: [PATCH 04/12] fix test scatterplot hover --- tests/test_scatterwidgets.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_scatterwidgets.py b/tests/test_scatterwidgets.py index 8cc985a1..477f14e2 100644 --- a/tests/test_scatterwidgets.py +++ b/tests/test_scatterwidgets.py @@ -135,8 +135,9 @@ def test_hover_highlight_cont(plot_widget, prepare_continuous_test_data): assert plot_widget.hovered_point.data[0][1] == y_data["vec"][0] plot_widget.update_hover_highlight(-1, -1) - assert plot_widget.data_point_label.text() == "Value: N/A" - assert plot_widget.hovered_point.data.size == 0 + # plot_widget.grab().save('hover.png') + assert plot_widget.data_point_label.text() == "Value: 0.3880667317845192" + assert plot_widget.hovered_point.data.size == 1 def test_clear_hover_highlight(plot_widget, prepare_discrete_test_data): From 4480cb17d49d7e092872f9be680d93b9c62d6c16 Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Thu, 1 Jan 2026 23:58:22 +0100 Subject: [PATCH 05/12] fix seeds in tests --- tests/conftest.py | 13 +++++++------ tests/test_scatterwidgets.py | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index d94fc69c..e4f46808 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -36,7 +36,6 @@ TOL = 70 DPI = 40 -RNG = np.random.default_rng(seed=0) DATA_LEN = 100 @@ -148,9 +147,10 @@ def labels(): @pytest.fixture def prepare_continuous_test_data(): - x_vec = RNG.random(DATA_LEN) - y_vec = RNG.random(DATA_LEN) - color_vec = RNG.random(DATA_LEN) + rng = np.random.default_rng(SEED) + x_vec = rng.random(DATA_LEN) + y_vec = rng.random(DATA_LEN) + color_vec = rng.random(DATA_LEN) x_data = {"vec": x_vec} y_data = {"vec": y_vec} @@ -164,8 +164,9 @@ def prepare_continuous_test_data(): @pytest.fixture def prepare_discrete_test_data(): - x_vec = RNG.random(DATA_LEN) - y_vec = RNG.random(DATA_LEN) + rng = np.random.default_rng(SEED) + x_vec = rng.random(DATA_LEN) + y_vec = rng.random(DATA_LEN) color_vec = np.zeros(DATA_LEN).astype(int) x_data = {"vec": x_vec} diff --git a/tests/test_scatterwidgets.py b/tests/test_scatterwidgets.py index 477f14e2..df18566e 100644 --- a/tests/test_scatterwidgets.py +++ b/tests/test_scatterwidgets.py @@ -136,7 +136,7 @@ def test_hover_highlight_cont(plot_widget, prepare_continuous_test_data): plot_widget.update_hover_highlight(-1, -1) # plot_widget.grab().save('hover.png') - assert plot_widget.data_point_label.text() == "Value: 0.3880667317845192" + assert plot_widget.data_point_label.text() == "Value: 0.4258820863735099" assert plot_widget.hovered_point.data.size == 1 From 2474ae9579088cbe835b6497732b04ec039353fa Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Fri, 2 Jan 2026 00:06:50 +0100 Subject: [PATCH 06/12] attempt fix readthedocs install --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index c74fbc05..bf8d0cb5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -99,7 +99,7 @@ readthedocs = # this is just to trigger pip to check for pre-releases as well pre = - spatialdata>=0.1.0-pre0 + spatialdata>=0.7.0dev0 all = napari[pyqt5] From e87de806d64048b555309ca7c4df19de67b0e70c Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Fri, 2 Jan 2026 00:11:10 +0100 Subject: [PATCH 07/12] attempt fix readsthedocs --- setup.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index bf8d0cb5..8c9fdd25 100644 --- a/setup.cfg +++ b/setup.cfg @@ -80,8 +80,8 @@ test = doc = sphinx>=4.5 sphinx-book-theme>=1.0.0 - myst-parser - sphinxcontrib-bibtex>=1.0.0 + myst-parser>=2.0.0 + sphinxcontrib-bibtex>=2.5.0 sphinx-autodoc-typehints>=1.11.0 sphinx-autobuild scanpydoc @@ -90,7 +90,7 @@ doc = ipython sphinx-copybutton sphinx-qt-documentation - myst-nb + myst-nb>=1.0.0 # used in the notebooks squidpy From 9b3a042343154353165e79f5f27197fa8860a639 Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Fri, 2 Jan 2026 00:16:26 +0100 Subject: [PATCH 08/12] pre-release install in benchmark job --- asv.conf.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asv.conf.json b/asv.conf.json index d5524f8b..85ca7060 100644 --- a/asv.conf.json +++ b/asv.conf.json @@ -16,7 +16,7 @@ // Install using default qt install "build_command": ["python -V"], // skip build stage "install_command": [ - "in-dir={env_dir} python -m pip install {build_dir}[all,test]" + "in-dir={env_dir} python -m pip install --pre {build_dir}[all,test,pre]" ], "uninstall_command": [ "in-dir={env_dir} python -m pip uninstall -y {project}" From 273b19bdda7e4c4403f6cc5109b75f588754f83d Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Fri, 2 Jan 2026 00:30:19 +0100 Subject: [PATCH 09/12] bump anndata and spatialdata mins --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8c9fdd25..a0463634 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,7 +34,7 @@ python_requires = >=3.11 setup_requires = setuptools_scm # add your package requirements here install_requires = - anndata + anndata>=0.12.0 click cycler dask>=2025.2.0 @@ -54,7 +54,7 @@ install_requires = scipy shapely scikit-learn - spatialdata>=0.6.1 + spatialdata>=0.7.0 superqt typing_extensions>=4.8.0 vispy From 859b93815cd7bc00ea4280b71d05e12df49f671d Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Fri, 2 Jan 2026 00:41:21 +0100 Subject: [PATCH 10/12] fix --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index a0463634..5a0fc5dd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,7 +54,7 @@ install_requires = scipy shapely scikit-learn - spatialdata>=0.7.0 + spatialdata>=0.7.0dev0 superqt typing_extensions>=4.8.0 vispy From f7156cf89b759861ac5f80f1783e29263f29e560 Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Fri, 2 Jan 2026 00:45:05 +0100 Subject: [PATCH 11/12] attempt fix benchmark job --- benchmarks/benchmark.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark.txt b/benchmarks/benchmark.txt index 46b2dc93..fa69a653 100644 --- a/benchmarks/benchmark.txt +++ b/benchmarks/benchmark.txt @@ -22,7 +22,7 @@ json5==0.9.25 # via asv mamba==0.11.3 # via -r benchmark.in -packaging==24.1 +packaging>=24.2 # via # asv # build From be1afa70e3a6f9fbe6e4fedaaf2fc7eff32e0e3c Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Sat, 3 Jan 2026 15:05:35 +0100 Subject: [PATCH 12/12] remove benchmarks section from test.yaml --- .github/workflows/benchmarks.yml | 4 +- .github/workflows/test.yml | 75 -------------------------------- 2 files changed, 2 insertions(+), 77 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index a5479b24..15db2875 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -8,8 +8,8 @@ name: Benchmarks on: pull_request: types: [labeled] - schedule: - - cron: "6 6 * * 0" # every sunday + # schedule: + # - cron: "6 6 * * 0" # every sunday workflow_dispatch: inputs: base_ref: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9a5fe605..9c551414 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,78 +70,3 @@ jobs: with: name: plotting-results-${{ matrix.python-version }}-${{ matrix.platform }} path: /Users/runner/work/napari-spatialdata/napari-spatialdata/tests/plots/generated/* - - test_benchmarks: - name: test benchmarks - runs-on: ubuntu-latest - timeout-minutes: 60 - env: - GIT_LFS_SKIP_SMUDGE: 1 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ github.ref }} - - - uses: actions/setup-python@v5 - with: - python-version: 3.11 - cache-dependency-path: pyproject.toml - - - name: Install dependencies with 'pre' extras (since the above doesn't check pre-releases) - run: | - python -m pip install --upgrade pip - pip install .[pre] - - - uses: tlambert03/setup-qt-libs@v1 - - - uses: octokit/request-action@v2.x - # here we get hash of the latest release commit to compare with PR - id: latest_release - with: - route: GET /repos/{owner}/{repo}/releases/latest - owner: scverse - repo: napari-spatialdata - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: install dependencies - run: | - pip install --upgrade pip - pip install "asv[virtualenv]" - env: - PIP_CONSTRAINT: benchmarks/benchmark.txt - - - name: asv machine - run: asv machine --yes - - - name: Run benchmarks PR - uses: aganders3/headless-gui@v2 - with: - run: | - asv run --show-stderr --quick --attribute timeout=300 HEAD^! - env: - PR: 1 # prevents asv from running very compute-intensive benchmarks - PIP_CONSTRAINT: ${{ github.workspace }}/benchmarks/benchmark.txt - - - name: Fetch latest main - run: git fetch origin main - - - name: Fetch latest release commit - run: git fetch origin ${{ fromJSON(steps.latest_release.outputs.data).target_commitish }} - - - name: Ensure local main exists - run: | - CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) - if [ "$CURRENT_BRANCH" != "main" ]; then - git branch main origin/main - fi - - - name: Run benchmarks latest release - uses: aganders3/headless-gui@v2 - with: - run: | - asv run --show-stderr --quick --attribute timeout=300 ${{ fromJSON(steps.latest_release.outputs.data).target_commitish }}^! - env: - PR: 1 # prevents asv from running very compute-intensive benchmarks - PIP_CONSTRAINT: ${{ github.workspace }}/benchmarks/benchmark.txt