Skip to content

Commit 26262be

Browse files
authored
Python 3.13 support (#4365)
* release < 3.13 pin * TO BE CHANGED: set python 3.13 for all platforms for test * bump ver in release * add classifier * add < 3.13 pin for matgl, but i don't think this is correct syntax * skip openff-toolkit * ignore matgl for python 3.13 * final test matrix
1 parent 4c58bcc commit 26262be

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install Python
3131
uses: actions/setup-python@v5
3232
with:
33-
python-version: "3.12"
33+
python-version: "3.13"
3434

3535
- name: Build source distribution
3636
run: |
@@ -76,7 +76,7 @@ jobs:
7676
- name: Set up Python
7777
uses: actions/setup-python@v5
7878
with:
79-
python-version: "3.12"
79+
python-version: "3.13"
8080

8181
- name: Get build artifacts
8282
uses: actions/download-artifact@v4

.github/workflows/test.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ jobs:
2828
# Maximize CI coverage of different platforms and python versions while minimizing the
2929
# total number of jobs. We run all pytest splits with the oldest supported python
3030
# version (currently 3.10) on windows (seems most likely to surface errors) and with
31-
# newest version (currently 3.12) on ubuntu (to get complete coverage on unix).
31+
# newest version (currently 3.13) on ubuntu (to get complete coverage on unix).
3232
config:
3333
- os: windows-latest
34-
python: "3.10"
34+
python: "3.11"
3535
resolution: highest
3636
extras: ci,optional,prototypes
3737
- os: windows-latest
38-
python: "3.10"
38+
python: "3.11"
3939
resolution: highest
4040
extras: ci,prototypes,optional,numpy-v1 # Test NP1 on Windows (quite buggy ATM)
4141
- os: ubuntu-latest
42-
python: "3.12"
42+
python: "3.13"
4343
resolution: lowest-direct
4444
extras: ci,prototypes,optional
4545
- os: macos-latest
46-
python: "3.11"
46+
python: "3.12"
4747
resolution: lowest-direct
4848
extras: ci,prototypes # test with only required dependencies installed
4949

@@ -71,7 +71,8 @@ jobs:
7171
if: matrix.config.os == 'ubuntu-latest'
7272
run: |
7373
micromamba install -n pmg -c conda-forge bader enumlib \
74-
openff-toolkit packmol pygraphviz tblite --yes
74+
packmol pygraphviz tblite --yes
75+
# openff-toolkit # TODO: doesn't support Python 3.13 yet
7576
7677
- name: Install uv
7778
uses: astral-sh/setup-uv@v4
@@ -86,7 +87,7 @@ jobs:
8687
uv pip install $WHEEL_FILE[${{matrix.config.extras}}] --resolution=${{matrix.config.resolution}}
8788
8889
- name: Install DGL and MatGL specially on ubuntu.
89-
if: matrix.config.os == 'ubuntu-latest'
90+
if: matrix.config.os == 'ubuntu-latest' && matrix.config.python < '3.13'
9091
run: |
9192
micromamba activate pmg
9293
pip install --upgrade dgl -f https://data.dgl.ai/wheels/torch-2.4/repo.html

pyproject.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Python Materials Genomics is a robust materials analysis code that defines core
2121
and molecules with support for many electronic structure codes. It is currently the core analysis code powering the
2222
Materials Project (https://materialsproject.org)."""
2323
readme = "README.md"
24-
requires-python = ">=3.10,<3.13"
24+
requires-python = ">=3.10"
2525
keywords = [
2626
"ABINIT",
2727
"VASP",
@@ -48,6 +48,7 @@ classifiers = [
4848
"Programming Language :: Python :: 3.10",
4949
"Programming Language :: Python :: 3.11",
5050
"Programming Language :: Python :: 3.12",
51+
"Programming Language :: Python :: 3.13",
5152
"Topic :: Scientific/Engineering :: Chemistry",
5253
"Topic :: Scientific/Engineering :: Information Analysis",
5354
"Topic :: Scientific/Engineering :: Physics",
@@ -90,7 +91,7 @@ Pypi = "https://pypi.org/project/pymatgen"
9091
abinit = ["netcdf4>=1.7.2"]
9192
ase = ["ase>=3.23.0"]
9293
electronic_structure = ["fdint>=2.0.2"]
93-
mlp = ["matgl>=1.2.5"]
94+
mlp = ["matgl>=1.2.5 ; python_version<'3.13'"]
9495
numba = ["numba>=0.55"]
9596
numpy-v1 = ["numpy>=1.25.0,<2"] # Test NP1 on Windows (quite buggy ATM)
9697
zeopp = ["pyzeo"] # Note: requires voro++ and zeo++ to be installed

0 commit comments

Comments
 (0)