Skip to content

Commit ed303fa

Browse files
authored
Enable Python 3.14 (emdgroup#716)
2 parents 05dcec0 + 94f4d9b commit ed303fa

10 files changed

Lines changed: 2890 additions & 1857 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
lint:
5353
strategy:
5454
matrix:
55-
py-version: [ {semantic: '3.13', tox: 'py313'} ]
55+
py-version: [ {semantic: '3.14', tox: 'py314'} ]
5656
name: Lint ${{ matrix.py-version.semantic }}
5757
runs-on: ubuntu-latest
5858
steps:
@@ -87,7 +87,7 @@ jobs:
8787
needs: [lint]
8888
strategy:
8989
matrix:
90-
py-version: [ {semantic: '3.13', tox: 'py313'} ]
90+
py-version: [ {semantic: '3.14', tox: 'py314'} ]
9191
name: Type Check ${{ matrix.py-version.semantic }}
9292
runs-on: ubuntu-latest
9393
steps:
@@ -105,7 +105,7 @@ jobs:
105105
needs: [lint]
106106
strategy:
107107
matrix:
108-
py-version: [ {semantic: '3.13', tox: 'py313'} ]
108+
py-version: [ {semantic: '3.14', tox: 'py314'} ]
109109
name: Audit ${{ matrix.py-version.semantic }}
110110
runs-on: ubuntu-latest
111111
steps:
@@ -123,7 +123,7 @@ jobs:
123123
needs: [typecheck]
124124
strategy:
125125
matrix:
126-
py-version: [ {semantic: '3.10', tox: 'py310'} ]
126+
py-version: [ {semantic: '3.10', tox: 'py310'}, {semantic: '3.14', tox: 'py314'} ]
127127
name: Core Tests ${{ matrix.py-version.semantic }}
128128
runs-on: ubuntu-latest
129129
steps:

.github/workflows/regular.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ jobs:
4848
py-version: [ {semantic: '3.10', tox: 'py310'},
4949
{semantic: '3.11', tox: 'py311'},
5050
{semantic: '3.12', tox: 'py312'},
51-
{semantic: '3.13', tox: 'py313'} ]
51+
{semantic: '3.13', tox: 'py313'},
52+
{semantic: '3.14', tox: 'py314'} ]
5253
name: Lint ${{ matrix.py-version.semantic }}
5354
runs-on: ubuntu-latest
5455
steps:
@@ -70,7 +71,8 @@ jobs:
7071
py-version: [ {semantic: '3.10', tox: 'py310'},
7172
{semantic: '3.11', tox: 'py311'},
7273
{semantic: '3.12', tox: 'py312'},
73-
{semantic: '3.13', tox: 'py313'} ]
74+
{semantic: '3.13', tox: 'py313'},
75+
{semantic: '3.14', tox: 'py314'} ]
7476
name: Type Check ${{ matrix.py-version.semantic }}
7577
runs-on: ubuntu-latest
7678
steps:
@@ -92,7 +94,8 @@ jobs:
9294
py-version: [ {semantic: '3.10', tox: 'py310'},
9395
{semantic: '3.11', tox: 'py311'},
9496
{semantic: '3.12', tox: 'py312'},
95-
{semantic: '3.13', tox: 'py313'} ]
97+
{semantic: '3.13', tox: 'py313'},
98+
{semantic: '3.14', tox: 'py314'} ]
9699
name: Audit ${{ matrix.py-version.semantic }}
97100
runs-on: ubuntu-latest
98101
steps:
@@ -114,7 +117,8 @@ jobs:
114117
py-version: [ {semantic: '3.10', tox: 'py310'},
115118
{semantic: '3.11', tox: 'py311'},
116119
{semantic: '3.12', tox: 'py312'},
117-
{semantic: '3.13', tox: 'py313'} ]
120+
{semantic: '3.13', tox: 'py313'},
121+
{semantic: '3.14', tox: 'py314'} ]
118122
name: Core Tests ${{ matrix.py-version.semantic }}
119123
runs-on: ubuntu-latest
120124
steps:
@@ -136,7 +140,8 @@ jobs:
136140
py-version: [ {semantic: '3.10', tox: 'py310'},
137141
{semantic: '3.11', tox: 'py311'},
138142
{semantic: '3.12', tox: 'py312'},
139-
{semantic: '3.13', tox: 'py313'} ]
143+
{semantic: '3.13', tox: 'py313'},
144+
{semantic: '3.14', tox: 'py314'} ]
140145
name: Full Tests ${{ matrix.py-version.semantic }}
141146
runs-on: ubuntu-latest
142147
steps:
@@ -171,7 +176,8 @@ jobs:
171176
py-version: [ {semantic: '3.10', tox: 'py310'},
172177
{semantic: '3.11', tox: 'py311'},
173178
{semantic: '3.12', tox: 'py312'},
174-
{semantic: '3.13', tox: 'py313'} ]
179+
{semantic: '3.13', tox: 'py313'},
180+
{semantic: '3.14', tox: 'py314'} ]
175181
name: GPU Tests ${{ matrix.py-version.semantic }}
176182
runs-on: XS-GPU
177183
steps:

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fetch-depth: 0
2727
- uses: actions/setup-python@v5
2828
with:
29-
python-version: "3.12"
29+
python-version: "3.14"
3030
- name: Clean
3131
run: |
3232
python -c 'import shutil; [shutil.rmtree(p, True) for p in ("build", "dist")]'
@@ -76,7 +76,7 @@ jobs:
7676
- uses: actions/setup-python@v5
7777
id: setup-python
7878
with:
79-
python-version: '3.12'
79+
python-version: '3.14'
8080
- name: Install test-package
8181
run: |
8282
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ baybe==${{ github.ref_name }}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# FORMATTER NOTE: The versions of ufmt, black and usort should be consistent everywhere
1+
# FORMATTER NOTE: The versions of the developer tools should be consistent everywhere
22
# (pre-commit, environment.yml, requirements.txt, pyproject.toml, ...)
33

44
ci:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [0.14.2] - 2026-01-14
88
### Added
9+
- Support for Python 3.14
910
- `NumericalTarget.match_*` constructors now accept a `mismatch_instead` argument. If
1011
set to `True`, targets seek to avoid the given `match_value` instead of matching it
1112
- `NumericalTarget.match_*` constructors now accept a `match_mode` argument. While `"="`
@@ -172,6 +173,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
172173
- The Python version specifier now also allows patch versions of Python 3.13
173174

174175
## [0.13.1] - 2025-06-06
176+
### Added
175177
- Support for Python 3.13
176178
- `random_tie_break` flag to `farthest_point_sampling` to toggle between
177179
random or deterministic sampling for equidistant cases

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ we recommend the following workflow:
4949
You can retrieve all available environments via `tox list`.
5050
For more information, see our [README about tests](https://github.com/emdgroup/baybe/blob/main/tests/README.md).
5151

52-
For instance, running all code tests in Python 3.13 can be achieved via:
52+
For instance, running all code tests in Python 3.14 can be achieved via:
5353
```console
54-
tox -e fulltest-py313
54+
tox -e fulltest-py314
5555
```
5656

57-
Other tox tests that are useful to verify your work locally are `tox -e lint-py313`,
58-
`tox -e mypy-py313` and `tox -e coretest-py313`.
57+
Other tox tests that are useful to verify your work locally are `tox -e lint-py314`,
58+
`tox -e mypy-py314` and `tox -e coretest-py314`.
5959

6060
If you want to challenge your machine, you can run all checks in all Python versions
6161
in parallel via:

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
]
77
readme = "README.md"
88
license = { text = "Apache-2.0" }
9-
requires-python =">=3.10,<3.14"
9+
requires-python =">=3.10,<3.15"
1010
classifiers = [
1111
"Development Status :: 4 - Beta",
1212
"Intended Audience :: Developers",
@@ -17,6 +17,7 @@ classifiers = [
1717
"Programming Language :: Python :: 3.11",
1818
"Programming Language :: Python :: 3.12",
1919
"Programming Language :: Python :: 3.13",
20+
"Programming Language :: Python :: 3.14",
2021
"Operating System :: OS Independent",
2122
"Typing :: Typed",
2223
]
@@ -130,7 +131,7 @@ lint = [
130131
]
131132

132133
mypy = [
133-
"mypy>=1.10.1",
134+
"mypy>=1.19.1",
134135
"pandas-stubs>=2.2.2.240603",
135136
"types-seaborn>=0.13.2.20240618",
136137
"types-psutil>=7.0.0.20250801",

tests/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ tox -e fulltest-py310
6868
```
6969
will run pytest on baybe with all optional features in python 3.10, while
7070
```bash
71-
tox -e coretest-py313
71+
tox -e coretest-py314
7272
```
73-
will run pytest on baybe without additional features in python 3.13.
73+
will run pytest on baybe without additional features in python 3.14.
7474
```bash
75-
tox -e lint-py313
75+
tox -e lint-py314
7676
```
77-
will run the linters with python 3.13.
77+
will run the linters with python 3.14.
7878

7979
For a full overview of all available environments, type:
8080
```

tox.ini

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[tox]
22
min_version = 4.9
3-
env_list = {fulltest,gputest,coretest,lint,mypy,audit}-py{310,311,312,313}
3+
env_list = {fulltest,gputest,coretest,lint,mypy,audit}-py{310,311,312,313,314}
44
isolated_build = True
55

6-
[testenv:fulltest,fulltest-py{310,311,312,313}]
6+
[testenv:fulltest,fulltest-py{310,311,312,313,314}]
77
description = Run PyTest with all extra functionality
88
extras = extras,examples,lint,test
99
passenv =
@@ -18,7 +18,7 @@ commands =
1818
python --version
1919
pytest -p no:warnings --cov=baybe --durations=5 {posargs}
2020

21-
[testenv:gputest,gputest-py{310,311,312,313}]
21+
[testenv:gputest,gputest-py{310,311,312,313,314}]
2222
description = Runs GPU tests
2323
extras = test
2424
passenv =
@@ -32,7 +32,7 @@ commands =
3232
python --version
3333
python -c "import torch; assert torch.cuda.is_available()"
3434

35-
[testenv:coretest,coretest-py{310,311,312,313}]
35+
[testenv:coretest,coretest-py{310,311,312,313,314}]
3636
description = Run PyTest with core functionality
3737
extras = test
3838
passenv =
@@ -47,7 +47,7 @@ commands =
4747
python --version
4848
pytest -p no:warnings --cov=baybe --durations=5 {posargs}
4949

50-
[testenv:lint,lint-py{310,311,312,313}]
50+
[testenv:lint,lint-py{310,311,312,313,314}]
5151
description = Run linters and format checkers
5252
extras = lint,examples
5353
skip_install = True
@@ -56,7 +56,7 @@ commands =
5656
python --version
5757
pre-commit run --all-files {posargs:--show-diff-on-failure}
5858

59-
[testenv:mypy,mypy-py{310,311,312,313}]
59+
[testenv:mypy,mypy-py{310,311,312,313,314}]
6060
description = Run mypy
6161
extras = mypy
6262
setenv =
@@ -75,6 +75,17 @@ commands =
7575
python --version
7676
pip-audit {env:EXCLUDES:}
7777

78+
# This is separated from the other audit block because in 3.14 only core deps are tested
79+
[testenv:audit-py314]
80+
description = Run pip-audit
81+
deps = pip-audit
82+
setenv =
83+
# Add pip-audit exceptions here, like:
84+
# EXCLUDES=--ignore-vuln EXCEPTION_ID1 --ignore-vuln EXCEPTION_ID2 ...
85+
commands =
86+
python --version
87+
pip-audit {env:EXCLUDES:}
88+
7889
[testenv:docs-py310]
7990
description = Build documentation, passing posargs to control what should be built
8091
skip_install = True

0 commit comments

Comments
 (0)