Skip to content

Commit ef4a1e7

Browse files
committed
Merge branch 'main' into cosmx_reader
2 parents cb147e2 + 79e5f89 commit ef4a1e7

55 files changed

Lines changed: 4253 additions & 1166 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: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
schedule:
55
- cron: "0 0 1 * *" # run once a month to prevent artifact expiration
66
workflow_dispatch:
7-
# 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.
89
# push:
910
# branches:
1011
# - main
@@ -14,13 +15,17 @@ jobs:
1415
runs-on: ubuntu-latest
1516

1617
steps:
17-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1819

1920
- name: Download test datasets
2021
run: |
2122
mkdir -p ./data
2223
cd ./data
2324
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+
2429
# 10x Genomics Xenium 2.0.0
2530
curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Breast_2fov/Xenium_V1_human_Breast_2fov_outs.zip
2631
curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Lung_2fov/Xenium_V1_human_Lung_2fov_outs.zip
@@ -32,9 +37,35 @@ jobs:
3237
# 10x Genomics Xenium 3.0.0 (5K) Mouse ileum, nuclear expansion
3338
curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_Mouse_Ileum_tiny/Xenium_Prime_Mouse_Ileum_tiny_outs.zip
3439
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
3558
# Spatial Genomics seqFISH v2
3659
curl -O https://s3.embl.de/spatialdata/raw_data/seqfish-2-test-dataset.zip
3760
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+
3869
- name: Unzip files
3970
run: |
4071
cd ./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: 5 additions & 5 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@v3
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,7 +52,7 @@ jobs:
5252
pip install --pre -e ".[dev,test]"
5353
5454
- name: Download artifact of test data
55-
if: matrix.python == '3.12'
55+
if: matrix.python == '3.13'
5656
uses: dawidd6/action-download-artifact@v9
5757
with:
5858
workflow: prepare_test_data.yaml

.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/
@@ -35,6 +36,17 @@ _version.py
3536
node_modules/
3637
.code-workspace
3738

39+
# memray report
40+
*.bin
41+
42+
# speedscope report
43+
profile.speedscope.json
44+
3845
# test datasets (e.g. Xenium ones)
46+
# symlinks
47+
data
48+
# data folder
3949
data/
4050
tests/data
51+
uv.lock
52+
.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.1
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.2
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.19.1
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

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
[badge-pypi]: https://badge.fury.io/py/spatialdata-io.svg
1515
[link-pypi]: https://pypi.org/project/spatialdata-io/
1616

17+
_We encourage contributions from the community and from developers of spatial technologies. Please see the "How to Contribute" section below._
18+
1719
This package contains reader functions to load common spatial omics formats into SpatialData. Currently, we provide support for:
1820

1921
- 10x Genomics Visium®
@@ -32,6 +34,8 @@ This package contains reader functions to load common spatial omics formats into
3234

3335
Note: all mentioned technologies are registered trademarks of their respective companies.
3436

37+
Please refer to the list of [open Pull Requests](https://github.com/scverse/spatialdata-io/pulls?q=sort%3Aupdated-desc+is%3Apr+is%3Aopen) for readers that are currently being developed.
38+
3539
## Known limitations
3640

3741
Contributions for addressing the below limitations are very welcomed.
@@ -42,9 +46,7 @@ Contributions for addressing the below limitations are very welcomed.
4246

4347
1. **Open a GitHub Issue**: Start by opening a new issue or commenting on an existing one in the repository. Clearly describe the problem and your proposed changes to avoid overlapping efforts with others.
4448

45-
2. **Submit a Pull Request (PR)**: Once the issue is discussed, submit a PR to the `spatialdata-io` repository. Ensure your PR includes information about a suitable dataset for testing the reader, ideally no larger than 10 GB. Include clear instructions for accessing the data, preferably with a `curl` or `wget` command for easy downloading.
46-
47-
3. **Optional Enhancements**: To facilitate reproducibility and ease of data access, consider adding a folder in the [spatialdata-sandbox](https://github.com/giovp/spatialdata-sandbox) repository. Include a `download.py` and `to_zarr.py` script (refer to examples in the repository) to enable others to reproduce your reader by simply running these scripts sequentially.
49+
2. **Submit a Pull Request (PR)**: Once the issue is discussed, submit a PR to the `spatialdata-io` repository. If you are contributing a new reader, or extending the reader for a new versions of a technologies, please consult our [contribution guide](https://spatialdata.scverse.org/projects/io/en/latest/contributing.html), which describes the steps to ensure that the pull request can be tested on suitable example data and reviewed efficiently.
4850

4951
## Getting started
5052

0 commit comments

Comments
 (0)