Skip to content

Commit cfd231b

Browse files
authored
Merge pull request #252 from seddonym/contributing-refresh
Contributing refresh
2 parents b1c48c4 + a389435 commit cfd231b

19 files changed

Lines changed: 416 additions & 293 deletions

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[ ] Add tests for the change. In general, aim for full test coverage at the Python level. Rust tests are optional.
2+
[ ] Add any appropriate documentation.
3+
[ ] Add a summary of changes to `CHANGELOG.rst`.
4+
[ ] Add your name to `AUTHORS.rst`.
5+
[ ] Run `just full-check`.

.github/workflows/main.yml

Lines changed: 47 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -9,81 +9,72 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
check_python:
13-
name: Check Python ${{ matrix.python-version }}, ${{ matrix.os }}
12+
check:
13+
runs-on: ubuntu-24.04
14+
name: Lint and check docs build
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install just
19+
uses: extractions/setup-just@v3
20+
21+
- name: Install uv and set the latest supported Python version
22+
uses: astral-sh/setup-uv@v7
23+
with:
24+
python-version: 3.14
25+
26+
- name: Lint Python
27+
run: just lint-python
28+
29+
- name: Lint Rust
30+
run: just lint-rust
31+
32+
- name: Check docs build
33+
run: just build-docs
34+
35+
test:
36+
name: Run tests for Python ${{ matrix.python-version }}, ${{ matrix.os }}
1437
runs-on: ${{ matrix.os }}
1538

1639
strategy:
1740
matrix:
1841
python-version: [
19-
"3.9", "3.10", "3.11", "3.12", "3.13-dev"
42+
"3.9", "3.10", "3.11", "3.12", "3.13", "3.14"
2043
]
2144
os: [ubuntu-latest, macos-latest, windows-latest]
2245

2346
steps:
2447
- uses: actions/checkout@v4
25-
- uses: actions-rs/toolchain@v1
26-
with:
27-
toolchain: stable
28-
- uses: actions/setup-python@v5
48+
49+
- name: Install just
50+
uses: extractions/setup-just@v3
51+
52+
- name: Install uv and set the Python version
53+
uses: astral-sh/setup-uv@v7
2954
with:
3055
python-version: ${{ matrix.python-version }}
31-
- name: Install dependencies
32-
run: |
33-
python -VV
34-
python -m site
35-
python -m pip install --upgrade pip setuptools wheel
36-
python -m pip install --upgrade coverage[toml] tox tox-gh-actions
37-
38-
- name: Run tox targets for ${{ matrix.python-version }}
39-
run: python -m tox
40-
41-
check_rust:
42-
name: Check Rust
43-
runs-on: ubuntu-22.04
44-
steps:
45-
- uses: actions/checkout@v4
46-
- uses: actions-rs/toolchain@v1
47-
with:
48-
toolchain: stable
49-
- name: Print versions
50-
run: cargo version --verbose && cargo clippy --version
51-
- name: Check formatting
52-
run: cargo fmt --check
53-
working-directory: ./rust
54-
- name: Run tests
55-
run: cargo test --no-default-features
56-
working-directory: ./rust
57-
- name: Run linter (clippy)
58-
run: cargo clippy --all-targets --all-features -- -D warnings
59-
working-directory: ./rust
56+
57+
- name: Test Python
58+
run: just test-python
59+
60+
- name: Test Rust
61+
run: just test-rust
6062

6163
benchmarks:
62-
runs-on: ubuntu-22.04
64+
runs-on: ubuntu-24.04
6365
steps:
64-
- uses: actions/checkout@v4
66+
- uses: actions/checkout@v5
6567

66-
- name: Install uv
67-
uses: astral-sh/setup-uv@v5
68+
- name: Install just
69+
uses: extractions/setup-just@v3
6870

69-
- name: Setup python
70-
uses: actions/setup-python@v5
71-
with:
72-
python-version: "3.13"
73-
allow-prereleases: true
74-
75-
# Temporarily install hardcoded dependencies here.
76-
# Codspeed doesn't work well with tox, as it runs the tox installation process as part of the benchmarking
77-
# process, which is very slow.
78-
- name: Install dependencies
79-
run: |
80-
python -VV
81-
uv venv
82-
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
71+
- name: Install uv
72+
uses: astral-sh/setup-uv@v7
8373

8474
- name: Run benchmarks
85-
uses: CodSpeedHQ/action@v3
75+
uses: CodSpeedHQ/action@v4
8676
with:
8777
token: ${{ secrets.CODSPEED_TOKEN }}
78+
mode: instrumentation
8879
run: |
89-
uv run pytest tests/benchmarking/ --codspeed
80+
just benchmark-ci

.github/workflows/release.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ jobs:
3333
- runner: ubuntu-latest
3434
target: ppc64le
3535
steps:
36-
- uses: actions/checkout@v4
37-
- uses: actions/setup-python@v5
36+
- uses: actions/checkout@v5
37+
- uses: actions/setup-python@v6
3838
with:
3939
python-version: |
4040
3.9
4141
3.10
4242
3.11
4343
3.12
4444
3.13
45+
3.14
4546
allow-prereleases: true
4647
- name: Build wheels
4748
uses: PyO3/maturin-action@v1
@@ -70,15 +71,16 @@ jobs:
7071
- runner: ubuntu-latest
7172
target: armv7
7273
steps:
73-
- uses: actions/checkout@v4
74-
- uses: actions/setup-python@v5
74+
- uses: actions/checkout@v5
75+
- uses: actions/setup-python@v6
7576
with:
7677
python-version: |
7778
3.9
7879
3.10
7980
3.11
8081
3.12
8182
3.13
83+
3.14
8284
allow-prereleases: true
8385
- name: Build wheels
8486
uses: PyO3/maturin-action@v1
@@ -103,15 +105,16 @@ jobs:
103105
- runner: windows-latest
104106
target: x86
105107
steps:
106-
- uses: actions/checkout@v4
107-
- uses: actions/setup-python@v5
108+
- uses: actions/checkout@v5
109+
- uses: actions/setup-python@v6
108110
with:
109111
python-version: |
110112
3.9
111113
3.10
112114
3.11
113115
3.12
114116
3.13
117+
3.14
115118
allow-prereleases: true
116119
architecture: ${{ matrix.platform.target }}
117120
- name: Build wheels
@@ -136,15 +139,16 @@ jobs:
136139
- runner: macos-14
137140
target: aarch64
138141
steps:
139-
- uses: actions/checkout@v4
140-
- uses: actions/setup-python@v5
142+
- uses: actions/checkout@v5
143+
- uses: actions/setup-python@v6
141144
with:
142145
python-version: |
143146
3.9
144147
3.10
145148
3.11
146149
3.12
147150
3.13
151+
3.14
148152
allow-prereleases: true
149153
- name: Build wheels
150154
uses: PyO3/maturin-action@v1
@@ -161,7 +165,7 @@ jobs:
161165
sdist:
162166
runs-on: ubuntu-latest
163167
steps:
164-
- uses: actions/checkout@v4
168+
- uses: actions/checkout@v5
165169
- name: Build sdist
166170
uses: PyO3/maturin-action@v1
167171
with:

.pre-commit-config.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This file contains configuration for the pre-commit (https://pre-commit.com/) tool.
2+
fail_fast: true
3+
repos:
4+
- repo: local
5+
hooks:
6+
- id: format-python
7+
name: Format Python
8+
entry: just format-python
9+
language: system
10+
require_serial: true
11+
pass_filenames: false
12+
files: "^pyproject\\.toml|^src/.*|^tests/.*|^docs/conf.py$"
13+
14+
- id: format-rust
15+
name: Format Rust
16+
entry: just format-rust
17+
language: system
18+
require_serial: true
19+
pass_filenames: false
20+
files: "^rust/.*$"
21+
22+
- id: lint-python
23+
name: Lint Python
24+
entry: just lint-python
25+
language: system
26+
pass_filenames: false
27+
files: "^pyproject\\.toml|^src/.*|^tests/.*|^docs/conf.py$"
28+
29+
- id: lint-rust
30+
name: Lint Rust
31+
entry: just lint-rust
32+
language: system
33+
pass_filenames: false
34+
files: "^rust/.*$"
35+
36+
- id: run-python-tests
37+
name: "Run Python tests"
38+
entry: just test-python
39+
language: system
40+
pass_filenames: false
41+
files: "^src/.*|^tests/.*|^rust/.*"
42+
43+
- id: run-rust-tests
44+
name: "Run Rust tests"
45+
entry: just test-rust
46+
language: system
47+
pass_filenames: false
48+
files: "^rust/.*"
49+
50+
- id: build-docs
51+
name: "Build docs"
52+
entry: just build-docs
53+
language: system
54+
pass_filenames: false
55+
files: "\\.rst$|^docs/.*"

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
version: 2
55

66
build:
7-
os: ubuntu-22.04
7+
os: ubuntu-24.04
88
tools:
9-
python: "3.11"
9+
python: "3.12"
1010

1111
sphinx:
1212
configuration: docs/conf.py

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog
33
=========
44

5+
latest
6+
------
7+
8+
* Officially support Python 3.14.
9+
510
3.11 (2025-09-01)
611
-----------------
712

0 commit comments

Comments
 (0)