Skip to content

Commit 8b223a3

Browse files
Merge pull request #32 from Open-ISP/upgrade-python
Upgrading python versions (and adding nox)
2 parents 775b9f0 + 4ab78a7 commit 8b223a3

File tree

5 files changed

+831
-719
lines changed

5 files changed

+831
-719
lines changed

.github/workflows/cicd.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,27 @@ jobs:
1717
fail-fast: true
1818
matrix:
1919
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
20-
python-version: ["3.9", "3.10", "3.11", "3.12"]
20+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2121
defaults:
2222
run:
2323
shell: bash
2424
runs-on: ${{ matrix.os }}
2525
steps:
2626
# Checkout repo
2727
- name: Checkout
28-
uses: actions/checkout@v3
29-
# Install uv with cache
30-
- name: Install the latest version of uv
31-
uses: astral-sh/setup-uv@v3
28+
uses: actions/checkout@v4
29+
# Install uv and set Python version
30+
- name: Install uv
31+
uses: astral-sh/setup-uv@v5
3232
with:
3333
enable-cache: true
34+
python-version: ${{ matrix.python-version }}
3435
# Sync dependencies
3536
- name: Sync dependencies
36-
run: uv sync
37-
# Run tests without updating uv.lock
37+
run: uv sync --python ${{ matrix.python-version }}
38+
# Run tests
3839
- name: Run tests
39-
run: uv run --frozen pytest
40+
run: uv run --frozen --python ${{ matrix.python-version }} pytest
4041
# Code coverage to codecov.io
4142
- name: Upload results to Codecov
4243
uses: codecov/codecov-action@v4
@@ -60,10 +61,10 @@ jobs:
6061
steps:
6162
# Checkout repo
6263
- name: Checkout
63-
uses: actions/checkout@v3
64-
# Install uv with cache
65-
- name: Install the latest version of uv
66-
uses: astral-sh/setup-uv@v3
64+
uses: actions/checkout@v4
65+
# Install uv
66+
- name: Install uv
67+
uses: astral-sh/setup-uv@v5
6768
with:
6869
enable-cache: true
6970
# Sync dependencies

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ Ready to contribute? Here's how to set up `isp-trace-parser` for local developme
6767

6868
- Run tests by running `uv run --frozen pytest`
6969

70+
- Optionally, run tests across python versions with nox
71+
Install `nox` (once, system wide, as a tool):
72+
```bash
73+
uv tool install nox
74+
```
75+
76+
Then run `nox` from project directory
77+
7078
7. Commit your changes and open a pull request.
7179

7280
## Pull Request Guidelines

noxfile.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import nox
2+
3+
nox.options.default_venv_backend = "uv"
4+
5+
PYTHON_VERSIONS = [
6+
"3.10",
7+
"3.11",
8+
"3.12",
9+
"3.13",
10+
"3.14",
11+
]
12+
13+
14+
@nox.session(python=PYTHON_VERSIONS)
15+
def tests(session: nox.Session) -> None:
16+
"""Run the test suite."""
17+
session.install("-e", ".", "--group", "dev")
18+
session.run("pytest")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies = [
2121
"pyarrow>=18.1.0",
2222
]
2323
readme = "README.md"
24-
requires-python = ">= 3.9"
24+
requires-python = ">= 3.10"
2525

2626
[build-system]
2727
requires = ["setuptools>=61.0", "wheel"]

0 commit comments

Comments
 (0)