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
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[ ] Add tests for the change. In general, aim for full test coverage at the Python level. Rust tests are optional.
[ ] Add any appropriate documentation.
[ ] Add a summary of changes to `CHANGELOG.rst`.
[ ] Add your name to `AUTHORS.rst`.
[ ] Run `just full-check`.
103 changes: 47 additions & 56 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,81 +9,72 @@ on:
workflow_dispatch:

jobs:
check_python:
name: Check Python ${{ matrix.python-version }}, ${{ matrix.os }}
check:
runs-on: ubuntu-24.04
name: Lint and check docs build
steps:
- uses: actions/checkout@v4

- name: Install just
uses: extractions/setup-just@v3

- name: Install uv and set the latest supported Python version
uses: astral-sh/setup-uv@v7
with:
python-version: 3.14

- name: Lint Python
run: just lint-python

- name: Lint Rust
run: just lint-rust

- name: Check docs build
run: just build-docs

test:
name: Run tests for Python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
python-version: [
"3.9", "3.10", "3.11", "3.12", "3.13-dev"
"3.9", "3.10", "3.11", "3.12", "3.13", "3.14"
]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/setup-python@v5

- name: Install just
uses: extractions/setup-just@v3

- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade coverage[toml] tox tox-gh-actions

- name: Run tox targets for ${{ matrix.python-version }}
run: python -m tox

check_rust:
name: Check Rust
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Print versions
run: cargo version --verbose && cargo clippy --version
- name: Check formatting
run: cargo fmt --check
working-directory: ./rust
- name: Run tests
run: cargo test --no-default-features
working-directory: ./rust
- name: Run linter (clippy)
run: cargo clippy --all-targets --all-features -- -D warnings
working-directory: ./rust

- name: Test Python
run: just test-python

- name: Test Rust
run: just test-rust

benchmarks:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install just
uses: extractions/setup-just@v3

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.13"
allow-prereleases: true

# Temporarily install hardcoded dependencies here.
# Codspeed doesn't work well with tox, as it runs the tox installation process as part of the benchmarking
# process, which is very slow.
- name: Install dependencies
run: |
python -VV
uv venv
uv pip install pytest==7.4.4 pyyaml==6.0.1 pytest-codspeed==3.2.0 Django==5.1.1 /home/runner/work/grimp/grimp
- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Run benchmarks
uses: CodSpeedHQ/action@v3
uses: CodSpeedHQ/action@v4
with:
token: ${{ secrets.CODSPEED_TOKEN }}
mode: instrumentation
run: |
uv run pytest tests/benchmarking/ --codspeed
just benchmark-ci
22 changes: 13 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@ jobs:
- runner: ubuntu-latest
target: ppc64le
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: |
3.9
3.10
3.11
3.12
3.13
3.14
allow-prereleases: true
- name: Build wheels
uses: PyO3/maturin-action@v1
Expand Down Expand Up @@ -70,15 +71,16 @@ jobs:
- runner: ubuntu-latest
target: armv7
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: |
3.9
3.10
3.11
3.12
3.13
3.14
allow-prereleases: true
- name: Build wheels
uses: PyO3/maturin-action@v1
Expand All @@ -103,15 +105,16 @@ jobs:
- runner: windows-latest
target: x86
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: |
3.9
3.10
3.11
3.12
3.13
3.14
allow-prereleases: true
architecture: ${{ matrix.platform.target }}
- name: Build wheels
Expand All @@ -136,15 +139,16 @@ jobs:
- runner: macos-14
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: |
3.9
3.10
3.11
3.12
3.13
3.14
allow-prereleases: true
- name: Build wheels
uses: PyO3/maturin-action@v1
Expand All @@ -161,7 +165,7 @@ jobs:
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
Expand Down
55 changes: 55 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This file contains configuration for the pre-commit (https://pre-commit.com/) tool.
fail_fast: true
repos:
- repo: local
hooks:
- id: format-python
name: Format Python
entry: just format-python
language: system
require_serial: true
pass_filenames: false
files: "^pyproject\\.toml|^src/.*|^tests/.*|^docs/conf.py$"

- id: format-rust
name: Format Rust
entry: just format-rust
language: system
require_serial: true
pass_filenames: false
files: "^rust/.*$"

- id: lint-python
name: Lint Python
entry: just lint-python
language: system
pass_filenames: false
files: "^pyproject\\.toml|^src/.*|^tests/.*|^docs/conf.py$"

- id: lint-rust
name: Lint Rust
entry: just lint-rust
language: system
pass_filenames: false
files: "^rust/.*$"

- id: run-python-tests
name: "Run Python tests"
entry: just test-python
language: system
pass_filenames: false
files: "^src/.*|^tests/.*|^rust/.*"

- id: run-rust-tests
name: "Run Rust tests"
entry: just test-rust
language: system
pass_filenames: false
files: "^rust/.*"

- id: build-docs
name: "Build docs"
entry: just build-docs
language: system
pass_filenames: false
files: "\\.rst$|^docs/.*"
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.11"
python: "3.12"

sphinx:
configuration: docs/conf.py
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
=========

latest
------

* Officially support Python 3.14.

3.11 (2025-09-01)
-----------------

Expand Down
Loading