diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ebca74c2fc..0933279258b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: - name: Install Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Build source distribution run: | @@ -76,7 +76,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Get build artifacts uses: actions/download-artifact@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6736225f0e9..08f0ec66db1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,18 +28,18 @@ jobs: # Maximize CI coverage of different platforms and python versions while minimizing the # total number of jobs. We run all pytest splits with the oldest supported python # version (currently 3.10) on windows (seems most likely to surface errors) and with - # newest version (currently 3.12) on ubuntu (to get complete coverage on unix). + # newest version (currently 3.13) on ubuntu (to get complete coverage on unix). config: - os: windows-latest python: "3.10" resolution: highest extras: ci,optional - os: windows-latest - python: "3.10" + python: "3.12" resolution: highest extras: ci,optional,numpy-v1 # Test NP1 on Windows (quite buggy ATM) - os: ubuntu-latest - python: "3.12" + python: "3.13" resolution: lowest-direct extras: ci,optional - os: macos-latest @@ -71,8 +71,10 @@ jobs: - name: Install ubuntu-only conda dependencies if: matrix.config.os == 'ubuntu-latest' run: | - micromamba install -n pmg -c conda-forge bader enumlib \ - openff-toolkit packmol pygraphviz tblite --yes + micromamba install -n pmg -c conda-forge --yes \ + bader enumlib packmol pygraphviz tblite + # openff-toolkit + # TODO: openff-toolkit doesn't support Python 3.13 yet - name: Install uv uses: astral-sh/setup-uv@v4 @@ -80,10 +82,6 @@ jobs: - name: Install pymatgen and dependencies via uv run: | micromamba activate pmg - # TODO1 (use uv over pip) uv install torch is flaky, track #3826 - # TODO2 (pin torch version): DGL library (matgl) doesn't support torch > 2.2.1, - # see: https://discuss.dgl.ai/t/filenotfounderror-cannot-find-dgl-c-graphbolt-library/4302 - pip install torch==2.2.1 # Install from wheels to test the content uv build --wheel --no-build-logs diff --git a/pyproject.toml b/pyproject.toml index db6f4b52ee6..f8d4b18e021 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ Python Materials Genomics is a robust materials analysis code that defines core and molecules with support for many electronic structure codes. It is currently the core analysis code powering the Materials Project (https://materialsproject.org).""" readme = "README.md" -requires-python = ">=3.10,<3.13" +requires-python = ">=3.10,<3.14" keywords = [ "ABINIT", "VASP", @@ -48,6 +48,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Chemistry", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Scientific/Engineering :: Physics", @@ -64,9 +65,9 @@ dependencies = [ "pybtex>=0.24.0", "requests>=2.32", "ruamel.yaml>=0.17.0", - "scipy>=1.13.0", # scipy<1.14.1 is incompatible with NumPy 2.0 on Windows # https://github.com/scipy/scipy/issues/21052 + "scipy>=1.13.0", "scipy>=1.14.1; platform_system == 'Windows'", "spglib>=2.5.0", "sympy>=1.3", # PR #4116 @@ -92,27 +93,29 @@ ase = ["ase>=3.23.0"] ci = ["pytest-cov>=4", "pytest-split>=0.8", "pytest>=8"] docs = ["invoke", "sphinx", "sphinx_markdown_builder", "sphinx_rtd_theme"] electronic_structure = ["fdint>=2.0.2"] -mlp = ["chgnet>=0.3.8", "matgl>=1.1.3"] -numba = ["numba>=0.55"] -numpy-v1 = ["numpy>=1.25.0,<2"] # Test NP1 on Windows (quite buggy ATM) +mlp = ["chgnet>=0.4.0; python_version<'3.13'", "matgl>=1.1.3; python_version<'3.13'"] +numba = ["numba>=0.55; python_version<'3.13'"] +numpy-v1 = ["numpy>=1.25.0,<2"] # Test NP1 on Windows (buggy at this moment) optional = [ "pymatgen[abinit,ase,mlp,tblite]", "beautifulsoup4", # BoltzTraP2 build fails on Windows GitHub runners - "BoltzTraP2>=24.9.4 ; platform_system != 'Windows'", + # TODO: BoltzTraP2 depends on netcdf4 which doesn't support Python 3.13 yet + "BoltzTraP2>=24.9.4 ; platform_system != 'Windows' and python_version<'3.13'", "chemview>=0.6", "f90nml>=1.1.2", "galore>=0.6.1", "h5py>=3.11.0", - "hiphive>=1.3.1", + "hiphive>=1.3.1; python_version<'3.13'", "jarvis-tools>=2020.7.14", "matplotlib>=3.8", + "openbabel-wheel>=3.1.1.20", "phonopy>=2.23", "seekpath>=2.0.1", ] # tblite only support Python 3.12+ through conda-forge # https://github.com/tblite/tblite/issues/175 -tblite = [ "tblite[ase]>=0.3.0; platform_system=='Linux' and python_version<'3.12'"] +tblite = ["tblite[ase]>=0.3.0; platform_system=='Linux' and python_version<'3.12'"] vis = ["vtk>=6.0.0"] [project.scripts]