Skip to content

Commit 8a41c13

Browse files
Merge pull request #232 from melonora/xarray_datatree
import datatree from xarray
2 parents 3c6be23 + ed60d9f commit 8a41c13

20 files changed

Lines changed: 46 additions & 51 deletions

File tree

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ ignore =
3838
D400
3939
# First line should be in imperative mood; try rephrasing
4040
D401
41+
# Abstract base class without abstractmethod.
42+
B024
4143
exclude = .git,__pycache__,build,docs/_build,dist
4244
per-file-ignores =
4345
tests/*: D

.github/workflows/test.yaml

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

2424
env:
@@ -52,15 +52,15 @@ jobs:
5252
pip install --pre -e ".[dev,test]"
5353
5454
- name: Download artifact of test data
55-
if: matrix.python == '3.10'
55+
if: matrix.python == '3.12'
5656
uses: dawidd6/action-download-artifact@v2
5757
with:
5858
workflow: prepare_test_data.yaml
5959
name: data
6060
path: ./data
6161

6262
- name: List the data directory
63-
if: matrix.python == '3.10'
63+
if: matrix.python == '3.12'
6464
run: |
6565
ls -l ./data
6666
pwd

.mypy.ini

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

55
ignore_errors = False

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ fail_fast: false
22
default_language_version:
33
python: python3
44
default_stages:
5-
- commit
6-
- push
5+
- pre-commit
6+
- pre-push
77
minimum_pre_commit_version: 2.16.0
88
repos:
99
- repo: https://github.com/psf/black
@@ -73,7 +73,7 @@ repos:
7373
rev: v3.17.0
7474
hooks:
7575
- id: pyupgrade
76-
args: [--py3-plus, --py39-plus, --keep-runtime-typing]
76+
args: [--py3-plus, --py310-plus, --keep-runtime-typing]
7777
- repo: local
7878
hooks:
7979
- id: forbid-to-commit

.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-20.04
55
tools:
6-
python: "3.9"
6+
python: "3.10"
77
sphinx:
88
configuration: docs/conf.py
99
fail_on_warning: true

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
}
9191

9292
intersphinx_mapping = {
93+
"python": ("https://docs.python.org/3", None),
9394
"anndata": ("https://anndata.readthedocs.io/en/stable/", None),
9495
"spatialdata": ("https://scverse-spatialdata.readthedocs.io/en/latest/", None),
9596
"numpy": ("https://numpy.org/doc/stable/", None),

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dynamic= [
1010
]
1111
description = "SpatialData IO for common techs"
1212
readme = "README.md"
13-
requires-python = ">=3.9"
13+
requires-python = ">=3.10"
1414
license = {file = "LICENSE"}
1515
authors = [
1616
{name = "scverse"},
@@ -83,7 +83,7 @@ skip_glob = ["docs/*"]
8383

8484
[tool.black]
8585
line-length = 120
86-
target-version = ['py39']
86+
target-version = ['py310']
8787
include = '\.pyi?$'
8888
exclude = '''
8989
(

src/spatialdata_io/_constants/_enum.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from abc import ABC, ABCMeta
2+
from collections.abc import Callable
23
from enum import Enum, EnumMeta
34
from functools import wraps
4-
from typing import Any, Callable
5+
from typing import Any
56

67

78
class PrettyEnum(Enum):

src/spatialdata_io/_docs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from __future__ import annotations
22

3+
from collections.abc import Callable
34
from textwrap import dedent
4-
from typing import Any, Callable
5+
from typing import Any
56

67

78
def inject_docs(**kwargs: Any) -> Callable[..., Any]: # noqa: D103

src/spatialdata_io/_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import functools
44
import warnings
5-
from typing import Any, Callable, TypeVar
5+
from collections.abc import Callable
6+
from typing import Any, TypeVar
67

78
RT = TypeVar("RT")
89

0 commit comments

Comments
 (0)