Skip to content

Commit 8a01879

Browse files
committed
CI: Test on Python 3.12
Update requirements.txt to use binary files and pre-releases if necessary.
1 parent 1cc19bb commit 8a01879

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
max-parallel: 4
2424
matrix:
25-
python-version: ['3.8', '3.9', '3.10', '3.11']
25+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
2626
requires: ['requirements.txt']
2727
include:
2828
- python-version: '3.8'
@@ -35,6 +35,7 @@ jobs:
3535
uses: actions/setup-python@v4
3636
with:
3737
python-version: ${{ matrix.python-version }}
38+
allow-prereleases: true
3839
- name: Install
3940
run: |
4041
python -m pip install --upgrade pip

min-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Auto-generated by tools/update_requirements.py
2+
--only-binary :all:
3+
--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
24
matplotlib==3.5
35
numpy==1.22
46
scipy==1.8

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Auto-generated by tools/update_requirements.py
2+
--only-binary :all:
3+
--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
24
matplotlib>=3.5
35
numpy>=1.22
46
scipy>=1.8

tools/update_requirements.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@
1919

2020
script_name = Path(__file__).relative_to(repo_root)
2121

22-
lines = [f'# Auto-generated by {script_name}', '']
22+
lines = [
23+
f'# Auto-generated by {script_name}',
24+
'--only-binary :all:',
25+
'--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple',
26+
'',
27+
]
28+
start = len(lines) - 1
2329

2430
# Write requirements
25-
lines[1:-1] = requirements
31+
lines[start:-1] = requirements
2632
reqs.write_text('\n'.join(lines))
2733

2834
# Write minimum requirements
29-
lines[1:-1] = [req.replace('>=', '==').replace('~=', '==') for req in requirements]
35+
lines[start:-1] = [req.replace('>=', '==').replace('~=', '==') for req in requirements]
3036
min_reqs.write_text('\n'.join(lines))

0 commit comments

Comments
 (0)