diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d05a605..f73cf42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7cec7b5..5ed9533 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ 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 @@ -15,13 +15,13 @@ repos: - 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 diff --git a/pyproject.toml b/pyproject.toml index 03b1e1d..babd424 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" }, @@ -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"] @@ -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", ] @@ -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