Skip to content

Commit 8c5ba82

Browse files
committed
Merge branch 'main' into issue288
2 parents a1c0b81 + 86e789f commit 8c5ba82

54 files changed

Lines changed: 4309 additions & 1181 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.flake8

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ changelog:
44
- release-ignore
55
authors:
66
- pre-commit-ci
7+
- pre-commit-ci[bot]
78
categories:
89
- title: Added
910
labels:

.github/workflows/prepare_test_data.yaml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: Prepare test data
22

33
on:
4+
schedule:
5+
- cron: "0 0 1 * *" # run once a month to prevent artifact expiration
46
workflow_dispatch:
5-
# uncomment and adjust the branch name if you need to add new datasets to the artifact
7+
# Uncomment and adjust the branch name if you need to add new datasets to the artifact.
8+
# It needs to be a branch in the spatialdata-io origin repository, not from a fork.
69
# push:
710
# branches:
811
# - main
@@ -12,13 +15,17 @@ jobs:
1215
runs-on: ubuntu-latest
1316

1417
steps:
15-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1619

1720
- name: Download test datasets
1821
run: |
1922
mkdir -p ./data
2023
cd ./data
2124
25+
# -------
26+
# the Xenium datasets are licensed as CC BY 4.0, as shown here
27+
# https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/resources/xenium-example-data
28+
2229
# 10x Genomics Xenium 2.0.0
2330
curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Breast_2fov/Xenium_V1_human_Breast_2fov_outs.zip
2431
curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Lung_2fov/Xenium_V1_human_Lung_2fov_outs.zip
@@ -30,9 +37,35 @@ jobs:
3037
# 10x Genomics Xenium 3.0.0 (5K) Mouse ileum, nuclear expansion
3138
curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_Mouse_Ileum_tiny/Xenium_Prime_Mouse_Ileum_tiny_outs.zip
3239
40+
# 10x Genomics Xenium 4.0.0 (v1) Human ovary, nuclear expansion
41+
curl -O https://cf.10xgenomics.com/samples/xenium/4.0.0/Xenium_V1_Human_Ovary_tiny/Xenium_V1_Human_Ovary_tiny_outs.zip
42+
43+
# 10x Genomics Xenium 4.0.0 (v1) Human ovary, multimodal cell segmentation
44+
curl -O https://cf.10xgenomics.com/samples/xenium/4.0.0/Xenium_V1_MultiCellSeg_Human_Ovary_tiny/Xenium_V1_MultiCellSeg_Human_Ovary_tiny_outs.zip
45+
46+
# 10x Genomics Xenium 4.0.0 (v1+Protein) Human kidney, multimodal cell segmentation
47+
curl -O https://cf.10xgenomics.com/samples/xenium/4.0.0/Xenium_V1_Protein_Human_Kidney_tiny/Xenium_V1_Protein_Human_Kidney_tiny_outs.zip
48+
49+
# -------
50+
# the Visium HD dataset is licensed as CC BY 4.0, as shown here
51+
# https://www.10xgenomics.com/support/software/space-ranger/latest/resources/visium-hd-example-data
52+
53+
# 10x Genomics Visium HD 4.0.1 3' Mouse Brain Chunk
54+
curl -O https://cf.10xgenomics.com/samples/spatial-exp/4.0.1/Visium_HD_Tiny_3prime_Dataset/Visium_HD_Tiny_3prime_Dataset_outs.zip
55+
56+
# -------
57+
# we received written permission to make the following dataset public and integrate it in the CI system of spatialdata-io
3358
# Spatial Genomics seqFISH v2
3459
curl -O https://s3.embl.de/spatialdata/raw_data/seqfish-2-test-dataset.zip
3560
61+
# -------
62+
# MACSima OMAP datasets are licensed as CC BY 4.0
63+
# OMAP23 for format v1.x.x
64+
curl -o OMAP23_small.zip "https://zenodo.org/api/records/18196452/files-archive"
65+
66+
# OMAP10 for format v0.x.x
67+
curl -o OMAP10_small.zip "https://zenodo.org/api/records/18196366/files-archive"
68+
3669
- name: Unzip files
3770
run: |
3871
cd ./data
@@ -44,7 +77,7 @@ jobs:
4477
done
4578
4679
- name: Upload artifacts
47-
uses: actions/upload-artifact@v3
80+
uses: actions/upload-artifact@v4
4881
with:
4982
name: data
5083
path: ./data

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: startsWith(github.ref, 'refs/tags/v')
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
- name: Set up Python 3.12
14-
uses: actions/setup-python@v4
14+
uses: actions/setup-python@v5
1515
with:
16-
python-version: "3.12"
16+
python-version: "3.13"
1717
cache: pip
1818
- name: Install build dependencies
1919
run: python -m pip install --upgrade pip wheel twine build

.github/workflows/test.yaml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python: ["3.10", "3.12"]
21+
python: ["3.11", "3.12", "3.13"]
2222
os: [ubuntu-latest]
2323

2424
env:
2525
OS: ${{ matrix.os }}
2626
PYTHON: ${{ matrix.python }}
2727

2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v4
3030
- name: Set up Python ${{ matrix.python }}
31-
uses: actions/setup-python@v4
31+
uses: actions/setup-python@v5
3232
with:
3333
python-version: ${{ matrix.python }}
3434

@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
echo "::set-output name=dir::$(pip cache dir)"
3939
- name: Restore pip cache
40-
uses: actions/cache@v2
40+
uses: actions/cache@v4
4141
with:
4242
path: ${{ steps.pip-cache-dir.outputs.dir }}
4343
key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}
@@ -52,19 +52,13 @@ jobs:
5252
pip install --pre -e ".[dev,test]"
5353
5454
- name: Download artifact of test data
55-
if: matrix.python == '3.12'
56-
uses: dawidd6/action-download-artifact@v2
55+
if: matrix.python == '3.13'
56+
uses: dawidd6/action-download-artifact@v9
5757
with:
5858
workflow: prepare_test_data.yaml
5959
name: data
6060
path: ./data
6161

62-
- name: List the data directory
63-
if: matrix.python == '3.12'
64-
run: |
65-
ls -l ./data
66-
pwd
67-
6862
- name: Test
6963
env:
7064
MPLBACKEND: agg

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ temp/
66

77
# Compiled files
88
__pycache__/
9+
.ipynb_checkpoints/
910

1011
# Distribution / packaging
1112
/build/
@@ -34,7 +35,20 @@ __pycache__/
3435
_version.py
3536
node_modules/
3637
.code-workspace
38+
.asv/
39+
uv.lock
40+
41+
# memray report
42+
*.bin
43+
44+
# speedscope report
45+
profile.speedscope.json
3746

3847
# test datasets (e.g. Xenium ones)
48+
# symlinks
49+
data
50+
# data folder
3951
data/
4052
tests/data
53+
uv.lock
54+
.asv/

.mypy.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[mypy]
22
python_version = 3.10
3-
plugins = numpy.typing.mypy_plugin
43

54
ignore_errors = False
65
warn_redundant_casts = True

.pre-commit-config.yaml

Lines changed: 8 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,24 @@ default_stages:
66
- pre-push
77
minimum_pre_commit_version: 2.16.0
88
repos:
9-
- repo: https://github.com/psf/black
10-
rev: 25.1.0
11-
hooks:
12-
- id: black
139
- repo: https://github.com/rbubley/mirrors-prettier
14-
rev: v3.5.1
10+
rev: v3.8.3
1511
hooks:
1612
- id: prettier
17-
- repo: https://github.com/asottile/blacken-docs
18-
rev: 1.19.1
19-
hooks:
20-
- id: blacken-docs
21-
- repo: https://github.com/PyCQA/isort
22-
rev: 6.0.0
13+
- repo: https://github.com/astral-sh/ruff-pre-commit
14+
rev: v0.15.12
2315
hooks:
24-
- id: isort
16+
- id: ruff
17+
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
18+
- id: ruff-format
2519
- repo: https://github.com/pre-commit/mirrors-mypy
26-
rev: v1.15.0
20+
rev: v1.20.2
2721
hooks:
2822
- id: mypy
2923
additional_dependencies: [numpy, types-PyYAML]
3024
exclude: docs/
31-
- repo: https://github.com/asottile/yesqa
32-
rev: v1.5.0
33-
hooks:
34-
- id: yesqa
35-
additional_dependencies:
36-
- flake8-tidy-imports
37-
- flake8-docstrings
38-
- flake8-rst-docstrings
39-
- flake8-comprehensions
40-
- flake8-bugbear
41-
- flake8-blind-except
4225
- repo: https://github.com/pre-commit/pre-commit-hooks
43-
rev: v5.0.0
26+
rev: v6.0.0
4427
hooks:
4528
- id: detect-private-key
4629
- id: check-ast
@@ -49,31 +32,6 @@ repos:
4932
args: [--fix=lf]
5033
- id: trailing-whitespace
5134
- id: check-case-conflict
52-
- repo: https://github.com/PyCQA/autoflake
53-
rev: v2.3.1
54-
hooks:
55-
- id: autoflake
56-
args:
57-
- --in-place
58-
- --remove-all-unused-imports
59-
- --remove-unused-variable
60-
- --ignore-init-module-imports
61-
- repo: https://github.com/PyCQA/flake8
62-
rev: 7.1.2
63-
hooks:
64-
- id: flake8
65-
additional_dependencies:
66-
- flake8-tidy-imports
67-
- flake8-docstrings
68-
- flake8-rst-docstrings
69-
- flake8-comprehensions
70-
- flake8-bugbear
71-
- flake8-blind-except
72-
- repo: https://github.com/asottile/pyupgrade
73-
rev: v3.19.1
74-
hooks:
75-
- id: pyupgrade
76-
args: [--py3-plus, --py310-plus, --keep-runtime-typing]
7735
- repo: local
7836
hooks:
7937
- id: forbid-to-commit
@@ -83,7 +41,3 @@ repos:
8341
Fix the merge conflicts manually and remove the .rej files.
8442
language: fail
8543
files: '.*\.rej$'
86-
- repo: https://github.com/PyCQA/doc8
87-
rev: v1.1.2
88-
hooks:
89-
- id: doc8

.readthedocs.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# https://docs.readthedocs.io/en/stable/config-file/v2.html
21
version: 2
32
build:
4-
os: ubuntu-20.04
3+
os: ubuntu-24.04
54
tools:
6-
python: "3.10"
5+
python: "3.12"
76
sphinx:
87
configuration: docs/conf.py
98
fail_on_warning: true

0 commit comments

Comments
 (0)