Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,34 @@ jobs:
run: pipx run pre-commit run --all-files

test:
name: ${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.resolution }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.11", "3.13"]
# ubuntu: full python range x both resolutions
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
resolution: [lowest-direct, highest]
# windows/macos: only the endpoints, highest resolution
include:
- { os: windows-latest, python-version: "3.10", resolution: highest }
- { os: windows-latest, python-version: "3.14", resolution: highest }
- { os: macos-latest, python-version: "3.10", resolution: highest }
- { os: macos-latest, python-version: "3.14", resolution: highest }

env:
UV_RESOLUTION: ${{ matrix.resolution }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Test with coverage
run: uv run pytest -v --cov=spatial_graph --cov-report=xml
run: uv run --no-dev --group test pytest -v --cov=spatial_graph --cov-report=xml
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.7
rev: v0.15.16
hooks:
- id: ruff-check
args: [--fix, --unsafe-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.1
rev: v2.1.0
hooks:
- id: mypy
20 changes: 15 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name = "spatial-graph"
dynamic = ["version"]
description = "A spatial graph datastructure for python."
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [
{ email = "funkej@janelia.hhmi.org", name = "Jan Funke" },
Expand All @@ -20,14 +20,24 @@ classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Typing :: Typed",
]
dependencies = ["witty>=v0.3.0", "CT3>=3.3.3", "numpy", "setuptools>=75.8.0"]
dependencies = [
"witty>=v0.3.0",
"CT3>=3.3.3",
"numpy>=2.3.2; python_version >= '3.14'",
"numpy>=2.1.0; python_version >= '3.13'",
"numpy>=1.26.0; python_version >= '3.12'",
"numpy>=1.23.2; python_version >= '3.11'",
"numpy>=1.21.2",
"setuptools>=75.8.0",
"typing_extensions>=4.5.0", # witty<=0.3.1 imports it without declaring it
]

[dependency-groups]
test = ["pytest>=8.3.5", "pytest-cov>=6.1.1"]
Expand All @@ -36,7 +46,7 @@ dev = [
{ include-group = "test" },
"ipython>=8.18.1",
"mypy>=1.15.0",
"pre-commit>=4.2.0",
"prek>=0.4.4",
"pytest-benchmark>=5.1.0", # specifically excluded from test group for ci
"ruff>=0.11.10",
]
Expand All @@ -54,7 +64,7 @@ homepage = "https://github.com/funkelab/spatial_graph"
repository = "https://github.com/funkelab/spatial_graph"

[tool.ruff]
target-version = "py39"
target-version = "py310"
line-length = 88
fix = true
unsafe-fixes = true
Expand Down
Loading