Skip to content

Commit bc2e65f

Browse files
Merge branch 'main' into dependabot/github_actions/actions-414940b0c9
2 parents 37b70b9 + b39fc55 commit bc2e65f

8 files changed

Lines changed: 27 additions & 100 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ name: Benchmarks
88
on:
99
pull_request:
1010
types: [labeled]
11-
schedule:
12-
- cron: "6 6 * * 0" # every sunday
11+
# schedule:
12+
# - cron: "6 6 * * 0" # every sunday
1313
workflow_dispatch:
1414
inputs:
1515
base_ref:
@@ -140,7 +140,7 @@ jobs:
140140
env:
141141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142142
PLATFORM: ${{ matrix.runs-on }}
143-
PYTHON: "3.9"
143+
PYTHON: "3.11"
144144
BACKEND: ${{ matrix.benchmark-name }}
145145
RUN_ID: ${{ github.run_id }}
146146
TITLE: "[test-bot] Benchmark tests failing"

.github/workflows/test.yml

Lines changed: 1 addition & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
platform: [ubuntu-latest, macos-latest] # [ubuntu-latest, windows-latest, macos-latest]
27-
python-version: ["3.10", "3.12"]
27+
python-version: ["3.11", "3.13"]
2828

2929
steps:
3030
- uses: actions/checkout@v6
@@ -70,78 +70,3 @@ jobs:
7070
with:
7171
name: plotting-results-${{ matrix.python-version }}-${{ matrix.platform }}
7272
path: /Users/runner/work/napari-spatialdata/napari-spatialdata/tests/plots/generated/*
73-
74-
test_benchmarks:
75-
name: test benchmarks
76-
runs-on: ubuntu-latest
77-
timeout-minutes: 60
78-
env:
79-
GIT_LFS_SKIP_SMUDGE: 1
80-
steps:
81-
- uses: actions/checkout@v6
82-
with:
83-
fetch-depth: 0
84-
ref: ${{ github.ref }}
85-
86-
- uses: actions/setup-python@v6
87-
with:
88-
python-version: 3.11
89-
cache-dependency-path: pyproject.toml
90-
91-
- name: Install dependencies with 'pre' extras (since the above doesn't check pre-releases)
92-
run: |
93-
python -m pip install --upgrade pip
94-
pip install .[pre]
95-
96-
- uses: tlambert03/setup-qt-libs@v1
97-
98-
- uses: octokit/request-action@v2.x
99-
# here we get hash of the latest release commit to compare with PR
100-
id: latest_release
101-
with:
102-
route: GET /repos/{owner}/{repo}/releases/latest
103-
owner: scverse
104-
repo: napari-spatialdata
105-
env:
106-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107-
108-
- name: install dependencies
109-
run: |
110-
pip install --upgrade pip
111-
pip install "asv[virtualenv]"
112-
env:
113-
PIP_CONSTRAINT: benchmarks/benchmark.txt
114-
115-
- name: asv machine
116-
run: asv machine --yes
117-
118-
- name: Run benchmarks PR
119-
uses: aganders3/headless-gui@v2
120-
with:
121-
run: |
122-
asv run --show-stderr --quick --attribute timeout=300 HEAD^!
123-
env:
124-
PR: 1 # prevents asv from running very compute-intensive benchmarks
125-
PIP_CONSTRAINT: ${{ github.workspace }}/benchmarks/benchmark.txt
126-
127-
- name: Fetch latest main
128-
run: git fetch origin main
129-
130-
- name: Fetch latest release commit
131-
run: git fetch origin ${{ fromJSON(steps.latest_release.outputs.data).target_commitish }}
132-
133-
- name: Ensure local main exists
134-
run: |
135-
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
136-
if [ "$CURRENT_BRANCH" != "main" ]; then
137-
git branch main origin/main
138-
fi
139-
140-
- name: Run benchmarks latest release
141-
uses: aganders3/headless-gui@v2
142-
with:
143-
run: |
144-
asv run --show-stderr --quick --attribute timeout=300 ${{ fromJSON(steps.latest_release.outputs.data).target_commitish }}^!
145-
env:
146-
PR: 1 # prevents asv from running very compute-intensive benchmarks
147-
PIP_CONSTRAINT: ${{ github.workspace }}/benchmarks/benchmark.txt

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: ubuntu-22.04
55
tools:
6-
python: "3.10"
6+
python: "3.11"
77
sphinx:
88
configuration: docs/conf.py
99
fail_on_warning: false

asv.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// Install using default qt install
1717
"build_command": ["python -V"], // skip build stage
1818
"install_command": [
19-
"in-dir={env_dir} python -m pip install {build_dir}[all,test]"
19+
"in-dir={env_dir} python -m pip install --pre {build_dir}[all,test,pre]"
2020
],
2121
"uninstall_command": [
2222
"in-dir={env_dir} python -m pip uninstall -y {project}"

benchmarks/benchmark.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ json5==0.9.25
2222
# via asv
2323
mamba==0.11.3
2424
# via -r benchmark.in
25-
packaging==24.1
25+
packaging>=24.2
2626
# via
2727
# asv
2828
# build

setup.cfg

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,29 @@ classifiers =
2020
Topic :: Software Development :: Testing
2121
Programming Language :: Python
2222
Programming Language :: Python :: 3
23-
Programming Language :: Python :: 3.10
2423
Programming Language :: Python :: 3.11
2524
Programming Language :: Python :: 3.12
25+
Programming Language :: Python :: 3.13
2626
Operating System :: OS Independent
2727
License :: OSI Approved :: BSD License
2828

2929

3030
[options]
3131
packages = find:
3232
include_package_data = True
33-
python_requires = >=3.10
33+
python_requires = >=3.11
3434
setup_requires = setuptools_scm
3535
# add your package requirements here
3636
install_requires =
37-
anndata
37+
anndata>=0.12.0
3838
click
3939
cycler
40-
dask>=2024.4.1,<=2024.11.2
40+
dask>=2025.2.0
4141
geopandas
4242
loguru
4343
matplotlib
4444
napari>=0.6.2
45-
napari-matplotlib
45+
napari-matplotlib>=3.0.2
4646
numba
4747
numpy
4848
packaging
@@ -54,7 +54,7 @@ install_requires =
5454
scipy
5555
shapely
5656
scikit-learn
57-
spatialdata>=0.2.6
57+
spatialdata>=0.7.0dev0
5858
superqt
5959
typing_extensions>=4.8.0
6060
vispy
@@ -80,8 +80,8 @@ test =
8080
doc =
8181
sphinx>=4.5
8282
sphinx-book-theme>=1.0.0
83-
myst-parser
84-
sphinxcontrib-bibtex>=1.0.0
83+
myst-parser>=2.0.0
84+
sphinxcontrib-bibtex>=2.5.0
8585
sphinx-autodoc-typehints>=1.11.0
8686
sphinx-autobuild
8787
scanpydoc
@@ -90,7 +90,7 @@ doc =
9090
ipython
9191
sphinx-copybutton
9292
sphinx-qt-documentation
93-
myst-nb
93+
myst-nb>=1.0.0
9494
# used in the notebooks
9595
squidpy
9696

@@ -99,7 +99,7 @@ readthedocs =
9999

100100
# this is just to trigger pip to check for pre-releases as well
101101
pre =
102-
spatialdata>=0.1.0-pre0
102+
spatialdata>=0.7.0dev0
103103

104104
all =
105105
napari[pyqt5]

tests/conftest.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
TOL = 70
3737
DPI = 40
3838

39-
RNG = np.random.default_rng(seed=0)
4039
DATA_LEN = 100
4140

4241

@@ -148,9 +147,10 @@ def labels():
148147

149148
@pytest.fixture
150149
def prepare_continuous_test_data():
151-
x_vec = RNG.random(DATA_LEN)
152-
y_vec = RNG.random(DATA_LEN)
153-
color_vec = RNG.random(DATA_LEN)
150+
rng = np.random.default_rng(SEED)
151+
x_vec = rng.random(DATA_LEN)
152+
y_vec = rng.random(DATA_LEN)
153+
color_vec = rng.random(DATA_LEN)
154154

155155
x_data = {"vec": x_vec}
156156
y_data = {"vec": y_vec}
@@ -164,8 +164,9 @@ def prepare_continuous_test_data():
164164

165165
@pytest.fixture
166166
def prepare_discrete_test_data():
167-
x_vec = RNG.random(DATA_LEN)
168-
y_vec = RNG.random(DATA_LEN)
167+
rng = np.random.default_rng(SEED)
168+
x_vec = rng.random(DATA_LEN)
169+
y_vec = rng.random(DATA_LEN)
169170
color_vec = np.zeros(DATA_LEN).astype(int)
170171

171172
x_data = {"vec": x_vec}

tests/test_scatterwidgets.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ def test_hover_highlight_cont(plot_widget, prepare_continuous_test_data):
135135
assert plot_widget.hovered_point.data[0][1] == y_data["vec"][0]
136136

137137
plot_widget.update_hover_highlight(-1, -1)
138-
assert plot_widget.data_point_label.text() == "Value: N/A"
139-
assert plot_widget.hovered_point.data.size == 0
138+
# plot_widget.grab().save('hover.png')
139+
assert plot_widget.data_point_label.text() == "Value: 0.4258820863735099"
140+
assert plot_widget.hovered_point.data.size == 1
140141

141142

142143
def test_clear_hover_highlight(plot_widget, prepare_discrete_test_data):

0 commit comments

Comments
 (0)