Skip to content

Commit b534195

Browse files
committed
Merge branch 'main' into steinbock_reader
2 parents 51bb983 + 79e5f89 commit b534195

65 files changed

Lines changed: 6525 additions & 1774 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 & 60 deletions
This file was deleted.

.github/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- release-ignore
5+
authors:
6+
- pre-commit-ci
7+
- pre-commit-ci[bot]
8+
categories:
9+
- title: Added
10+
labels:
11+
- "release-added"
12+
- title: Changed
13+
labels:
14+
- "release-changed"
15+
- title: Deprecated
16+
labels:
17+
- "release-deprecated"
18+
- title: Removed
19+
labels:
20+
- "release-removed"
21+
- title: Fixed
22+
labels:
23+
- "release-fixed"
24+
- title: Security
25+
labels:
26+
- "release-security"
27+
- title: Other Changes
28+
labels:
29+
- "*"

.github/workflows/build.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 55 additions & 7 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,24 +15,69 @@ 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
24+
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+
29+
# 10x Genomics Xenium 2.0.0
2130
curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Breast_2fov/Xenium_V1_human_Breast_2fov_outs.zip
2231
curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Lung_2fov/Xenium_V1_human_Lung_2fov_outs.zip
2332
33+
# 10x Genomics Xenium 3.0.0 (5K) Mouse ileum, multimodal cell segmentation
34+
# this file seems to be corrupted; skipping it for now
35+
# curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny/Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny.zip
36+
37+
# 10x Genomics Xenium 3.0.0 (5K) Mouse ileum, nuclear expansion
38+
curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_Mouse_Ileum_tiny/Xenium_Prime_Mouse_Ileum_tiny_outs.zip
39+
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
58+
# Spatial Genomics seqFISH v2
59+
curl -O https://s3.embl.de/spatialdata/raw_data/seqfish-2-test-dataset.zip
60+
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+
2469
- name: Unzip files
2570
run: |
26-
unzip ./data/Xenium_V1_human_Breast_2fov_outs.zip -d ./data/Xenium_V1_human_Breast_2fov_outs
27-
unzip ./data/Xenium_V1_human_Lung_2fov_outs.zip -d ./data/Xenium_V1_human_Lung_2fov_outs
28-
rm ./data/Xenium_V1_human_Breast_2fov_outs.zip
29-
rm ./data/Xenium_V1_human_Lung_2fov_outs.zip
71+
cd ./data
72+
for file in *.zip; do
73+
dir="${file%.zip}"
74+
mkdir -p "$dir"
75+
unzip "$file" -d "$dir"
76+
rm "$file"
77+
done
3078
3179
- name: Upload artifacts
32-
uses: actions/upload-artifact@v3
80+
uses: actions/upload-artifact@v4
3381
with:
3482
name: data
3583
path: ./data

.github/workflows/release.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@ on:
55
types: [published]
66

77
jobs:
8-
release:
9-
# requires that you have put your twine API key in your
10-
# github secrets (see readme for details)
8+
package_and_release:
119
runs-on: ubuntu-latest
12-
if: contains(github.ref, 'tags')
10+
if: startsWith(github.ref, 'refs/tags/v')
1311
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v3
16-
17-
- name: Set up Python 3.10
18-
uses: actions/setup-python@v4
12+
- uses: actions/checkout@v4
13+
- name: Set up Python 3.12
14+
uses: actions/setup-python@v5
1915
with:
20-
python-version: "3.10"
21-
16+
python-version: "3.13"
17+
cache: pip
18+
- name: Install build dependencies
19+
run: python -m pip install --upgrade pip wheel twine build
20+
- name: Build package
21+
run: python -m build
22+
- name: Check package
23+
run: twine check --strict dist/*.whl
2224
- name: Install hatch
2325
run: pip install hatch
24-
2526
- name: Build project for distribution
2627
run: hatch build
27-
2828
- name: Publish a Python distribution to PyPI
2929
uses: pypa/gh-action-pypi-publish@release/v1
3030
with:

.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.9", "3.10"]
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.10'
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.10'
64-
run: |
65-
ls -l ./data
66-
pwd
67-
6862
- name: Test
6963
env:
7064
MPLBACKEND: agg

.gitignore

Lines changed: 12 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/
@@ -37,6 +38,17 @@ node_modules/
3738
.asv/
3839
uv.lock
3940

41+
# memray report
42+
*.bin
43+
44+
# speedscope report
45+
profile.speedscope.json
46+
4047
# test datasets (e.g. Xenium ones)
48+
# symlinks
49+
data
50+
# data folder
4151
data/
4252
tests/data
53+
uv.lock
54+
.asv/

.mypy.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[mypy]
2-
python_version = 3.9
3-
plugins = numpy.typing.mypy_plugin
2+
python_version = 3.10
43

54
ignore_errors = False
65
warn_redundant_casts = True

0 commit comments

Comments
 (0)