Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
71c2110
simplify conditional
melonora Mar 28, 2024
93ca0ed
Merge branch 'main' of https://github.com/melonora/napari-spatialdata
melonora May 21, 2024
f363842
Merge branch 'main' of https://github.com/melonora/napari-spatialdata
melonora Jun 19, 2024
07f60a5
Merge branch 'main' of https://github.com/melonora/napari-spatialdata
melonora Jun 24, 2024
784e95b
Merge branch 'main' of https://github.com/melonora/napari-spatialdata
melonora Jun 24, 2024
79a2a50
Merge branch 'scverse:main' into main
melonora Jul 9, 2024
29b1579
Merge branch 'scverse:main' into main
melonora Jul 22, 2024
5a2de2e
Merge branch 'scverse:main' into main
melonora Aug 9, 2024
7576271
Merge branch 'scverse:main' into main
melonora Sep 7, 2024
85e5c61
Merge branch 'scverse:main' into main
melonora Sep 19, 2024
dcc6b68
Merge branch 'scverse:main' into main
melonora Oct 14, 2024
3036463
Merge branch 'scverse:main' into main
melonora Dec 2, 2024
044bd18
Merge branch 'scverse:main' into main
melonora Dec 17, 2024
788a328
Merge branch 'main' of https://github.com/scverse/napari-spatialdata
melonora Feb 13, 2025
16f8a2e
Merge branch 'main' of https://github.com/melonora/napari-spatialdata
melonora Feb 13, 2025
8bda7d0
Merge branch 'main' of https://github.com/scverse/napari-spatialdata
melonora Mar 16, 2025
851333c
merge main
melonora Apr 18, 2025
bb29dd6
merge main
melonora May 26, 2025
b66f1ab
add channel_widget, remove colorbar
melonora Jun 2, 2025
a3a0761
allow multiscale channel selection
melonora Jun 2, 2025
40b0e86
add test and fix
melonora Jun 2, 2025
2959acd
copy dask pin from spatialdata
melonora Jun 2, 2025
ee067ad
remove quote
melonora Jun 2, 2025
abb01c2
merge three widgets
melonora Jun 2, 2025
3484cf4
update docstring
melonora Jun 2, 2025
d9dd413
remove require_widget wrapper
melonora Jun 3, 2025
4cc8410
remove unused element attribute
melonora Jun 3, 2025
02416a0
change widget type to bool param
melonora Jun 3, 2025
003bc94
readd elements for cache but remove dict
melonora Jun 3, 2025
0429cf1
Update napari to 0.6.2 and add bermuda (#368)
melonora Jul 4, 2025
29c1c14
[pre-commit.ci] pre-commit autoupdate + fix qt tests (#360)
pre-commit-ci[bot] Aug 14, 2025
0cbb9f3
better comments
LucaMarconato Aug 14, 2025
77c08bf
attempt napari tests with offscreen
LucaMarconato Aug 15, 2025
fde2382
fix skip tests if napari offscreen
Aug 15, 2025
8db31af
Update release.yml
LucaMarconato Aug 15, 2025
1391e9e
small updates for zarrv3 branch (#374)
melonora Sep 13, 2025
03b58f3
fix docs typo
LucaMarconato Sep 13, 2025
c95e3e2
Merge branch 'main' of https://github.com/scverse/napari-spatialdata
LucaMarconato Sep 13, 2025
232ac93
Update spatialdata pre version in setup.cfg
LucaMarconato Jan 1, 2026
b39fc55
bump mins: python, spatialdata, dask (#377)
LucaMarconato Jan 3, 2026
39bbb38
[pre-commit.ci] pre-commit autoupdate (#370)
pre-commit-ci[bot] Jan 6, 2026
a67669f
ci(dependabot): bump the actions group across 1 directory with 5 upda…
dependabot[bot] Jan 6, 2026
75268eb
add ui for changing point size in scatterplot (#383)
LucaMarconato Jan 6, 2026
5daf882
fix tests cleanup (#357)
LucaMarconato Jan 6, 2026
2e64014
Better 3D and 2.5D support for raster and vector data (#366)
LucaMarconato Jan 6, 2026
9a49914
fix scanpy set_default_colors_for_categorical_obs
LucaMarconato Jan 27, 2026
c5d9fec
Fix scanpy set_default_colors_for_categorical_obs (#385)
LucaMarconato Jan 27, 2026
6747bf0
Merge branch 'main' of https://github.com/scverse/napari-spatialdata
LucaMarconato Jan 28, 2026
07ff794
Fix docs links (#389)
LucaMarconato Feb 24, 2026
a5b423f
Patch headless tests due to `QT_QPA_PLATFORM=offscreen` edgecase (#390)
LucaMarconato Mar 23, 2026
3a8b87f
ci(dependabot): bump the actions group across 1 directory with 4 upda…
dependabot[bot] May 5, 2026
88edca3
[pre-commit.ci] pre-commit autoupdate (#384)
pre-commit-ci[bot] May 12, 2026
3dfb2c0
Support 3D visualization for points and 2.5D shapes (#393)
asarigun May 15, 2026
b04047b
Merge branch 'main' into select_channels
LucaMarconato May 15, 2026
feab299
fix tests
LucaMarconato May 15, 2026
35020e3
Replace Channels widget with 'add in new layer' checkbox on Vars
LucaMarconato May 15, 2026
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
1 change: 1 addition & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ changelog:
- release-ignore
authors:
- pre-commit-ci
- pre-commit-ci[bot]
categories:
- title: Added
labels:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -59,11 +59,11 @@ jobs:
steps:
# We need the full repo to avoid this issue
# https://github.com/actions/checkout/issues/23
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
name: Install Python
with:
python-version: "3.11"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:

fi

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
if: always()
with:
name: asv-benchmark-results-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ matrix.benchmark-name }}
Expand All @@ -182,13 +182,13 @@ jobs:
if: always()
steps:
- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
pattern: asv-benchmark-results*
path: asv_result
merge-multiple: true
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: asv-benchmark-results-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
path: asv_result
6 changes: 3 additions & 3 deletions .github/workflows/benchmarks_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/github-script@v7
uses: actions/github-script@v9
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:

- name: "Comment on PR"
if: env.PR_NUMBER != ''
uses: actions/github-script@v7
uses: actions/github-script@v9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -84,7 +84,7 @@ jobs:

- name: "Remove run-benchmarks label"
if: env.PR_NUMBER != ''
uses: actions/github-script@v7
uses: actions/github-script@v9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: hynek/build-and-inspect-python-package@v2

upload-to-pypi:
Expand All @@ -21,7 +21,7 @@ jobs:

steps:
- name: Download built artifact to dist/
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: Packages
path: dist
Expand Down
87 changes: 6 additions & 81 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ 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
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -62,86 +62,11 @@ jobs:
PLATFORM: ${{ matrix.platform }}

- name: Coverage
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v6

- name: Archive figures generated during testing
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: plotting-results-${{ matrix.python-version }}-${{ matrix.platform }}
path: /home/runner/work/napari-spatialdata/napari-spatialdata/tests/plots/*

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
path: /Users/runner/work/napari-spatialdata/napari-spatialdata/tests/plots/generated/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,4 @@ tests/plots/generated

# Local temp script for testing user bugs (Luca)
temp/
uv.lock
1 change: 0 additions & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[mypy]
mypy_path = napari-spatialdata
python_version = 3.10
plugins = numpy.typing.mypy_plugin

ignore_errors = False
warn_redundant_casts = True
Expand Down
20 changes: 12 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ default_stages:
minimum_pre_commit_version: 2.9.3
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
rev: v1.20.2
hooks:
- id: mypy
additional_dependencies: [numpy>=1.23]
exclude: docs
- repo: https://github.com/psf/black
rev: 25.1.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.3.1
hooks:
- id: black
additional_dependencies: [toml]
Expand All @@ -22,16 +22,16 @@ repos:
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: detect-private-key
- id: check-merge-conflict
- id: check-ast
- id: check-symlinks
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: fix-encoding-pragma
args: [--remove]
# - id: fix-encoding-pragma
# args: [--remove]
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
Expand All @@ -45,11 +45,15 @@ repos:
- id: check-toml
- id: requirements-txt-fixer
- repo: https://github.com/asottile/blacken-docs
rev: 1.19.1
rev: 1.20.0
hooks:
- id: blacken-docs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.6
rev: v0.15.12
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,7 +12,7 @@ python:
- method: pip
path: .
extra_requirements:
- "doc"
- "docs"
- "all"
- "readthedocs"
- "pre"
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
[link-pypi]: https://pypi.org/project/napari-spatialdata/

This repository contains a napari plugin for interactively exploring and annotating
SpatialData objects. Here you can find the [napari-spatialdata documentation]
(https://spatialdata.scverse.org/projects/napari/en/stable/notebooks/spatialdata.html). `napari-spatialdata` is part of the `SpatialData` ecosystem. To learn more about SpatialData, please see the [spatialdata documentation](https://spatialdata.scverse.org/).
SpatialData objects. Here you can find the [napari-spatialdata documentation](https://spatialdata.scverse.org/projects/napari/en/stable/notebooks/spatialdata.html). `napari-spatialdata` is part of the `SpatialData` ecosystem. To learn more about SpatialData, please see the [spatialdata documentation](https://spatialdata.scverse.org/).

## Installation

Expand All @@ -28,6 +27,13 @@ You can install `napari-spatialdata` via [pip]:

The `all` command will install the qt bindings `PyQt5`.

Napari now also includes multiple triangulation backends. These improve the speed by which a napari 'Shapes' layer gets
loaded (this does not improve the speed of editing large numbers of shapes yet!). See also the napari
[documentation](https://napari.org/stable/guides/triangulation.html) and already slightly older [blog post](https://napari.org/island-dispatch/blog/triangles_speedup_beta.html). For installation via
pip:

pip install napari-spatialdata[all, bermuda]

You can find more details on this in the [installation instructions](https://spatialdata.scverse.org/en/stable/installation.html).

## Using napari-spatialdata as default zarr reader
Expand Down
2 changes: 1 addition & 1 deletion asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
info = metadata("napari-spatialdata")
project_name = info["Name"]
author = info["Author"]
copyright = f"{datetime.now():%Y}, {author}."
copyright = f"{datetime.now():%Y}, {author}"
version = info["Version"]
repository_url = f"https://github.com/scverse/{project_name}"

Expand Down
22 changes: 22 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# Contributing guide

Please refer to the [contribution guide from the `spatialdata` repository](https://github.com/scverse/spatialdata/blob/main/docs/contributing.md).

## Debugging napari GUI tests

To visually inspect what a test is rendering in napari:

1. Change `make_napari_viewer()` to `make_napari_viewer(show=True)`
2. Add `napari.run()` before the end of the test (before the assertions)

Example:

```python
import napari


def test_my_visualization(make_napari_viewer):
viewer = make_napari_viewer(show=True)
# ... setup code ...
napari.run()
# assertions...
```

Remember to revert these changes before committing.
Loading
Loading