Skip to content

Commit c743312

Browse files
authored
Add python 3.12 compatibility (#26)
1 parent 6742c09 commit c743312

4 files changed

Lines changed: 212 additions & 75 deletions

File tree

.github/workflows/cd.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: 3.11
18+
1419
- name: Install uv
1520
uses: astral-sh/setup-uv@v4
1621
with:

.github/workflows/ci.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@ jobs:
1313
permissions:
1414
pull-requests: write
1515
contents: write
16+
strategy:
17+
matrix:
18+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1619
steps:
1720
- uses: actions/checkout@v4
1821

22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
1927
- name: Install uv
2028
uses: astral-sh/setup-uv@v4
2129
with:
@@ -48,6 +56,29 @@ jobs:
4856
Xvfb :99 &
4957
uv run pytest --cov=src --cov-fail-under=85
5058
59+
pr-docs:
60+
if: github.event_name == 'pull_request'
61+
runs-on: ubuntu-latest
62+
needs: ci
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- name: Set up Python
67+
uses: actions/setup-python@v4
68+
with:
69+
python-version: 3.11
70+
71+
- name: Install uv
72+
uses: astral-sh/setup-uv@v4
73+
with:
74+
version: "0.5.10"
75+
76+
- name: Install tkinter for GUI
77+
run: sudo apt install python3-tk -y
78+
79+
- name: Set up env
80+
run: uv sync --all-extras --frozen
81+
5182
- name: Copy notebooks to docs folder
5283
run: cp -r notebooks/* docs/notebooks
5384

@@ -58,7 +89,6 @@ jobs:
5889
uv run mkdocs build --site-dir site/pr-${{ github.event.pull_request.number }}
5990
6091
- name: Deploy PR docs
61-
if: github.event_name == 'pull_request'
6292
uses: peaceiris/actions-gh-pages@v4
6393
with:
6494
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -68,14 +98,9 @@ jobs:
6898
keep_files: true # Retain other content on gh-pages
6999

70100
- name: Add PR note
71-
if: github.event_name == 'pull_request'
72101
uses: marocchino/sticky-pull-request-comment@v2
73102
with:
74103
message: |
75104
### :books: Docs
76105
77106
Created [temporary docs](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-${{ github.event.pull_request.number }}/).
78-
79-
80-
81-

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ maintainers = [
1313
]
1414

1515
dependencies = [
16-
"numpy",
16+
"numpy>=1.26.0",
1717
"matplotlib>=2.2.4",
18-
"scipy",
18+
"scipy>=1.11.0",
1919
"jupyter",
2020
"python-statemachine",
2121
"torch",

0 commit comments

Comments
 (0)