From 3b1b0771cae6dd0bdb0d497d86660e8fa7a336d9 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Fri, 26 Apr 2024 10:41:10 +0800 Subject: [PATCH 01/39] enable `boltztrap2` --- requirements-optional.txt | 2 +- setup.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/requirements-optional.txt b/requirements-optional.txt index b5a29956285..8f4b6b26e71 100644 --- a/requirements-optional.txt +++ b/requirements-optional.txt @@ -1,5 +1,5 @@ ase>=3.22.1 -BoltzTraP2>=22.3.2 +BoltzTraP2>=24.1.1 chemview>=0.6 f90nml>=1.4.3 fdint>=2.0.2 diff --git a/setup.py b/setup.py index 47dd203f786..62fe003ad26 100644 --- a/setup.py +++ b/setup.py @@ -69,10 +69,7 @@ ], "optional": [ "ase>=3.22.1", - # TODO restore BoltzTraP2 when install fixed, hopefully following merge of - # https://gitlab.com/sousaw/BoltzTraP2/-/merge_requests/18 - # caused CI failure due to ModuleNotFoundError: No module named 'packaging' - # "BoltzTraP2>=22.3.2; platform_system!='Windows'", + "BoltzTraP2>=24.1.1; platform_system!='Windows'", "chemview>=0.6", "chgnet", "f90nml>=1.1.2", From 6568e05e139f2f5493df7cbc2ab1afd34b9adb1e Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Fri, 26 Apr 2024 10:52:12 +0800 Subject: [PATCH 02/39] Revert "enable `boltztrap2`" This reverts commit 3b1b0771cae6dd0bdb0d497d86660e8fa7a336d9. --- requirements-optional.txt | 2 +- setup.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/requirements-optional.txt b/requirements-optional.txt index 8f4b6b26e71..b5a29956285 100644 --- a/requirements-optional.txt +++ b/requirements-optional.txt @@ -1,5 +1,5 @@ ase>=3.22.1 -BoltzTraP2>=24.1.1 +BoltzTraP2>=22.3.2 chemview>=0.6 f90nml>=1.4.3 fdint>=2.0.2 diff --git a/setup.py b/setup.py index 62fe003ad26..47dd203f786 100644 --- a/setup.py +++ b/setup.py @@ -69,7 +69,10 @@ ], "optional": [ "ase>=3.22.1", - "BoltzTraP2>=24.1.1; platform_system!='Windows'", + # TODO restore BoltzTraP2 when install fixed, hopefully following merge of + # https://gitlab.com/sousaw/BoltzTraP2/-/merge_requests/18 + # caused CI failure due to ModuleNotFoundError: No module named 'packaging' + # "BoltzTraP2>=22.3.2; platform_system!='Windows'", "chemview>=0.6", "chgnet", "f90nml>=1.1.2", From ec9b65e3be84840297193a5d65bcdbd90c52e28e Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Fri, 26 Apr 2024 10:52:44 +0800 Subject: [PATCH 03/39] use explicit encoding --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 47dd203f786..1eea5df1241 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ is_win_64 = sys.platform.startswith("win") and platform.machine().endswith("64") extra_link_args = ["-Wl,--allow-multiple-definition"] if is_win_64 else [] -with open("README.md") as file: +with open("README.md", encoding="utf-8") as file: long_description = file.read() # unlike GitHub readme's, PyPI doesn't support tags used for responsive images From 186ead525490e5108126f90c381855b721e3e545 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Fri, 26 Apr 2024 10:54:08 +0800 Subject: [PATCH 04/39] install graphviz --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 1eea5df1241..fb30a36ea94 100644 --- a/setup.py +++ b/setup.py @@ -77,6 +77,7 @@ "chgnet", "f90nml>=1.1.2", "galore>=0.6.1", + "graphviz>=0.20.3", "h5py>=3.8.0", "jarvis-tools>=2020.7.14", "matgl", From 45e0dc7798cb39b7d0c86ed53f77a4a1cddfe3b4 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Fri, 26 Apr 2024 11:01:42 +0800 Subject: [PATCH 05/39] increment boltztrap version to 24.1.1 --- requirements-optional.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-optional.txt b/requirements-optional.txt index b5a29956285..8f4b6b26e71 100644 --- a/requirements-optional.txt +++ b/requirements-optional.txt @@ -1,5 +1,5 @@ ase>=3.22.1 -BoltzTraP2>=22.3.2 +BoltzTraP2>=24.1.1 chemview>=0.6 f90nml>=1.4.3 fdint>=2.0.2 diff --git a/setup.py b/setup.py index fb30a36ea94..e7b746e6707 100644 --- a/setup.py +++ b/setup.py @@ -72,7 +72,7 @@ # TODO restore BoltzTraP2 when install fixed, hopefully following merge of # https://gitlab.com/sousaw/BoltzTraP2/-/merge_requests/18 # caused CI failure due to ModuleNotFoundError: No module named 'packaging' - # "BoltzTraP2>=22.3.2; platform_system!='Windows'", + # "BoltzTraP2>=24.1.1; platform_system!='Windows'", "chemview>=0.6", "chgnet", "f90nml>=1.1.2", From 11d6a7d2e447c5818005331f3a8ef0a55b9bfbd0 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Fri, 26 Apr 2024 16:03:52 +0800 Subject: [PATCH 06/39] fix bader patch --- tests/command_line/test_bader_caller.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/command_line/test_bader_caller.py b/tests/command_line/test_bader_caller.py index c3d9b609946..5a9564fcec4 100644 --- a/tests/command_line/test_bader_caller.py +++ b/tests/command_line/test_bader_caller.py @@ -2,7 +2,6 @@ import warnings from shutil import which -from unittest.mock import patch import numpy as np import pytest @@ -60,7 +59,6 @@ def test_init(self): assert len(analysis.data) == 14 # Test Cube file format parsing - copy_r(TEST_DIR, self.tmp_path) analysis = BaderAnalysis(cube_filename=f"{TEST_DIR}/elec.cube.gz") assert len(analysis.data) == 9 @@ -131,12 +129,10 @@ def test_atom_parsing(self): ) def test_missing_file_bader_exe_path(self): - pytest.skip("doesn't reliably raise RuntimeError") - # mock which("bader") to return None so we always fall back to use bader_exe_path - with ( - patch("shutil.which", return_value=None), - pytest.raises( - RuntimeError, match="BaderAnalysis requires the executable bader be in the PATH or the full path " - ), - ): - BaderAnalysis(chgcar_filename=f"{VASP_OUT_DIR}/CHGCAR.Fe3O4.gz", bader_exe_path="") + # Mock which("bader") to return None so we always fall back to use bader_exe_path + with pytest.MonkeyPatch.context() as monkeypatch: + monkeypatch.setenv("PATH", "") + + with pytest.raises( + RuntimeError, match="Requires bader or bader.exe to be in the PATH or the absolute path"): + BaderAnalysis(chgcar_filename=f"{VASP_OUT_DIR}/CHGCAR.Fe3O4.gz") From 108b440d8ef96d4eab2addc389c6a3b04b94631e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 08:05:07 +0000 Subject: [PATCH 07/39] pre-commit auto-fixes --- tests/command_line/test_bader_caller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/command_line/test_bader_caller.py b/tests/command_line/test_bader_caller.py index 5a9564fcec4..716ce83722f 100644 --- a/tests/command_line/test_bader_caller.py +++ b/tests/command_line/test_bader_caller.py @@ -134,5 +134,6 @@ def test_missing_file_bader_exe_path(self): monkeypatch.setenv("PATH", "") with pytest.raises( - RuntimeError, match="Requires bader or bader.exe to be in the PATH or the absolute path"): + RuntimeError, match="Requires bader or bader.exe to be in the PATH or the absolute path" + ): BaderAnalysis(chgcar_filename=f"{VASP_OUT_DIR}/CHGCAR.Fe3O4.gz") From eecb0fb3f966252eecad321a6ff69d4b720d9374 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Fri, 26 Apr 2024 16:05:45 +0800 Subject: [PATCH 08/39] ruff fix --- tests/command_line/test_bader_caller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/command_line/test_bader_caller.py b/tests/command_line/test_bader_caller.py index 5a9564fcec4..716ce83722f 100644 --- a/tests/command_line/test_bader_caller.py +++ b/tests/command_line/test_bader_caller.py @@ -134,5 +134,6 @@ def test_missing_file_bader_exe_path(self): monkeypatch.setenv("PATH", "") with pytest.raises( - RuntimeError, match="Requires bader or bader.exe to be in the PATH or the absolute path"): + RuntimeError, match="Requires bader or bader.exe to be in the PATH or the absolute path" + ): BaderAnalysis(chgcar_filename=f"{VASP_OUT_DIR}/CHGCAR.Fe3O4.gz") From 3f37027a6a901f740c0603e5ea281cb39dff21fc Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Fri, 26 Apr 2024 16:48:17 +0800 Subject: [PATCH 09/39] tweak bader test --- tests/command_line/test_bader_caller.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/command_line/test_bader_caller.py b/tests/command_line/test_bader_caller.py index 716ce83722f..9b412303eb3 100644 --- a/tests/command_line/test_bader_caller.py +++ b/tests/command_line/test_bader_caller.py @@ -74,17 +74,17 @@ def test_from_path(self): analysis = BaderAnalysis(chgcar_filename=chgcar_path, chgref_filename=chgref_path) analysis_from_path = BaderAnalysis.from_path(from_path_dir) - for key in analysis_from_path.summary: - val, val_from_path = analysis.summary[key], analysis_from_path.summary[key] - if isinstance(analysis_from_path.summary[key], (bool, str)): + for key, val_from_path in analysis_from_path.summary.items(): + val = analysis.summary[key] + if isinstance(val_from_path, (bool, str)): assert val == val_from_path, f"{key=}" elif key == "charge": assert_allclose(val, val_from_path, atol=1e-5) def test_bader_analysis_from_path(self): - summary = bader_analysis_from_path(TEST_DIR) """ Reference summary dict (with bader 1.0) + summary_ref = { "magmom": [4.298761, 4.221997, 4.221997, 3.816685, 4.221997, 4.298763, 0.36292, 0.370516, 0.36292, 0.36292, 0.36292, 0.36292, 0.36292, 0.370516], @@ -100,6 +100,9 @@ def test_bader_analysis_from_path(self): "reference_used": True, } """ + + summary = bader_analysis_from_path(TEST_DIR) + assert set(summary) == { "magmom", "min_dist", From c48f159b9cae64fb64e518908052eef8c14f31ea Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sun, 28 Apr 2024 22:10:36 +0800 Subject: [PATCH 10/39] need confirm: add `wheel` to dev dep --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e7b746e6707..db5ba73fefe 100644 --- a/setup.py +++ b/setup.py @@ -61,6 +61,7 @@ "pytest", "ruff", "typing-extensions", + "wheel", ], "docs": [ "sphinx", @@ -72,7 +73,7 @@ # TODO restore BoltzTraP2 when install fixed, hopefully following merge of # https://gitlab.com/sousaw/BoltzTraP2/-/merge_requests/18 # caused CI failure due to ModuleNotFoundError: No module named 'packaging' - # "BoltzTraP2>=24.1.1; platform_system!='Windows'", + "BoltzTraP2>=24.1.1; platform_system!='Windows'", "chemview>=0.6", "chgnet", "f90nml>=1.1.2", From 114c582657d7d37504d0a7da7cdef6a0c8497101 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sun, 28 Apr 2024 22:16:52 +0800 Subject: [PATCH 11/39] try install BoltzTraP2 with pip --- .github/workflows/test.yml | 4 ++-- setup.py | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 24b61d90aac..135aa26f4f9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,9 +76,9 @@ jobs: micromamba activate pmg # TODO remove temporary fix. added since uv install torch is flaky. # track https://github.com/astral-sh/uv/issues/1921 for resolution - pip install torch + pip install torch BoltzTraP2 - uv pip install numpy cython + uv pip install numpy cython wheel uv pip install --editable '.[dev,optional]' diff --git a/setup.py b/setup.py index db5ba73fefe..b565cfe0031 100644 --- a/setup.py +++ b/setup.py @@ -61,7 +61,6 @@ "pytest", "ruff", "typing-extensions", - "wheel", ], "docs": [ "sphinx", @@ -70,9 +69,6 @@ ], "optional": [ "ase>=3.22.1", - # TODO restore BoltzTraP2 when install fixed, hopefully following merge of - # https://gitlab.com/sousaw/BoltzTraP2/-/merge_requests/18 - # caused CI failure due to ModuleNotFoundError: No module named 'packaging' "BoltzTraP2>=24.1.1; platform_system!='Windows'", "chemview>=0.6", "chgnet", From 2c7cd558b4560addd94f913f4a1a2a26d7aee384 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sun, 28 Apr 2024 22:21:03 +0800 Subject: [PATCH 12/39] add comment --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 135aa26f4f9..5a75615429f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,6 +76,7 @@ jobs: micromamba activate pmg # TODO remove temporary fix. added since uv install torch is flaky. # track https://github.com/astral-sh/uv/issues/1921 for resolution + # uv cannot install BoltzTraP2 for some reason pip install torch BoltzTraP2 uv pip install numpy cython wheel From 0386dac7b20f6c666dec0e230ee2f8a414632c59 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sun, 28 Apr 2024 22:25:29 +0800 Subject: [PATCH 13/39] try move bolt after numpy to fix win, remove wheel --- .github/workflows/test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a75615429f..d27a146a658 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,10 +76,12 @@ jobs: micromamba activate pmg # TODO remove temporary fix. added since uv install torch is flaky. # track https://github.com/astral-sh/uv/issues/1921 for resolution - # uv cannot install BoltzTraP2 for some reason - pip install torch BoltzTraP2 + pip install torch + + uv pip install numpy cython - uv pip install numpy cython wheel + # uv cannot install BoltzTraP2 for some reason + pip install BoltzTraP2 uv pip install --editable '.[dev,optional]' From 68b678a286a35233e594f5a22091b3e68d2346cd Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sun, 28 Apr 2024 22:31:37 +0800 Subject: [PATCH 14/39] try move boltrap2 to ubuntu only --- .github/workflows/test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d27a146a658..5a4a1c7f55e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,18 +71,20 @@ jobs: run: | micromamba install -n pmg -c conda-forge enumlib packmol bader openbabel openff-toolkit --yes + micromamba activate pmg + # uv cannot install BoltzTraP2 for some reason + pip install BoltzTraP2 + - name: Install pymatgen and dependencies run: | micromamba activate pmg + # TODO remove temporary fix. added since uv install torch is flaky. # track https://github.com/astral-sh/uv/issues/1921 for resolution pip install torch uv pip install numpy cython - # uv cannot install BoltzTraP2 for some reason - pip install BoltzTraP2 - uv pip install --editable '.[dev,optional]' # TODO remove next line installing ase from main branch when FrechetCellFilter is released From 95a1ef954b4e8ffb7b6b4a9c7979d08f0df74f3a Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sun, 28 Apr 2024 22:33:48 +0800 Subject: [PATCH 15/39] more description more accurate --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a4a1c7f55e..93be3fa47ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,7 +66,7 @@ jobs: run: | sudo cp cmd_line/gulp/Linux_64bit/* /usr/local/bin/ - - name: Install ubuntu-only conda dependencies + - name: Install ubuntu-only dependencies if: matrix.os == 'ubuntu-latest' run: | micromamba install -n pmg -c conda-forge enumlib packmol bader openbabel openff-toolkit --yes From 3e6518bccb64bfa9e2db7fb548e19fb60131072b Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sat, 13 Jul 2024 17:46:23 +0800 Subject: [PATCH 16/39] install BoltzTraP2 in CI --- pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4801a5537f6..dafdde86c8c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,10 +104,7 @@ docs = [ ] optional = [ "ase>=3.23.0", - # TODO restore BoltzTraP2 when install fixed, hopefully following merge of - # https://gitlab.com/sousaw/BoltzTraP2/-/merge_requests/18 - # caused CI failure due to ModuleNotFoundError: No module named 'packaging' - # "BoltzTraP2>=22.3.2; platform_system!='Windows'", + "BoltzTraP2>=24.1.1; platform_system!='Windows'", "chemview>=0.6", "chgnet>=0.3.8", "f90nml>=1.1.2", From abca86214ca22f3dfd4b6f970360af52914bb4ad Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sat, 13 Jul 2024 21:43:49 +0800 Subject: [PATCH 17/39] try to install BoltzTraP2 with uv --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c5816561c5..54e4401b44c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,10 +72,6 @@ jobs: run: | micromamba install -n pmg -c conda-forge enumlib packmol bader openbabel openff-toolkit --yes - micromamba activate pmg - # uv cannot install BoltzTraP2 for some reason - pip install BoltzTraP2 - - name: Install pymatgen and dependencies run: | micromamba activate pmg From 780bb2484e8e27c9012a564d53d9eb7c0079255f Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sat, 13 Jul 2024 21:58:07 +0800 Subject: [PATCH 18/39] remove repeated numpy install in CI tests --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54e4401b44c..6bb12125715 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,7 +80,7 @@ jobs: # track https://github.com/astral-sh/uv/issues/1921 for resolution pip install torch --upgrade - uv pip install numpy cython + uv pip install cython uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} - name: pytest split ${{ matrix.split }} From 4128284e1903efdd96853a62e69cb65cc3b73a0b Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sat, 13 Jul 2024 22:06:21 +0800 Subject: [PATCH 19/39] update np.exceptions.RankWarning --- src/pymatgen/analysis/eos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pymatgen/analysis/eos.py b/src/pymatgen/analysis/eos.py index fc526884537..23381dc44ad 100644 --- a/src/pymatgen/analysis/eos.py +++ b/src/pymatgen/analysis/eos.py @@ -419,7 +419,7 @@ def fit(self, min_ndata_factor=3, max_poly_order_factor=5, min_poly_order=2): min_poly_order (int): minimum order of the polynomial to be considered for fitting. """ - warnings.simplefilter("ignore", np.RankWarning) + warnings.simplefilter("ignore", np.exceptions.RankWarning) def get_rms(x, y): return np.sqrt(np.sum((np.array(x) - np.array(y)) ** 2) / len(x)) From d5344739a608f932edfe65fa5e25cf3e03a1bd0f Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sat, 13 Jul 2024 22:07:26 +0800 Subject: [PATCH 20/39] Revert "update np.exceptions.RankWarning" This reverts commit 4128284e1903efdd96853a62e69cb65cc3b73a0b. --- src/pymatgen/analysis/eos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pymatgen/analysis/eos.py b/src/pymatgen/analysis/eos.py index 23381dc44ad..fc526884537 100644 --- a/src/pymatgen/analysis/eos.py +++ b/src/pymatgen/analysis/eos.py @@ -419,7 +419,7 @@ def fit(self, min_ndata_factor=3, max_poly_order_factor=5, min_poly_order=2): min_poly_order (int): minimum order of the polynomial to be considered for fitting. """ - warnings.simplefilter("ignore", np.exceptions.RankWarning) + warnings.simplefilter("ignore", np.RankWarning) def get_rms(x, y): return np.sqrt(np.sum((np.array(x) - np.array(y)) ** 2) / len(x)) From 293c87eece00ee5887925b6f2d0b4d770506a263 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 15 Jul 2024 09:55:00 +0800 Subject: [PATCH 21/39] install setuptool with uv --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6bb12125715..80e94f66944 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,7 +80,7 @@ jobs: # track https://github.com/astral-sh/uv/issues/1921 for resolution pip install torch --upgrade - uv pip install cython + uv pip install cython setuptools uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} - name: pytest split ${{ matrix.split }} From c52f3c2119d65d32bc989e968b395132dde3c687 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 15 Jul 2024 21:42:54 +0800 Subject: [PATCH 22/39] update BoltzTraP2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dafdde86c8c..b2b1a4eddc1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,7 +104,7 @@ docs = [ ] optional = [ "ase>=3.23.0", - "BoltzTraP2>=24.1.1; platform_system!='Windows'", + "BoltzTraP2>=24.7.2; platform_system!='Windows'", "chemview>=0.6", "chgnet>=0.3.8", "f90nml>=1.1.2", From 209a6434ac25bd203c42a3ed685765e863cab5e7 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 15 Jul 2024 21:48:21 +0800 Subject: [PATCH 23/39] install wheel for building boltztrap2 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80e94f66944..2748e494e52 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,7 +80,7 @@ jobs: # track https://github.com/astral-sh/uv/issues/1921 for resolution pip install torch --upgrade - uv pip install cython setuptools + uv pip install cython setuptools wheel uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} - name: pytest split ${{ matrix.split }} From 534c7a758d7f562f53784e35c7a828667b76fb23 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 15 Jul 2024 21:52:50 +0800 Subject: [PATCH 24/39] try to install boltztrap2 with pip not uv --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2748e494e52..a0f553f33f9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,6 +80,8 @@ jobs: # track https://github.com/astral-sh/uv/issues/1921 for resolution pip install torch --upgrade + pip install boltztrap2 + uv pip install cython setuptools wheel uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} From 8d4480642b97d2a26bfb55f34dcce8dc303c6ca6 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 16:10:34 +0800 Subject: [PATCH 25/39] install cython before boltztrap2 --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aef8037f0b6..bd66089773f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,9 +80,10 @@ jobs: # track https://github.com/astral-sh/uv/issues/1921 for resolution pip install torch --upgrade + uv pip install cython setuptools wheel + pip install boltztrap2 - uv pip install cython setuptools wheel uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} - name: pytest split ${{ matrix.split }} From d7cf794f99e3ee4b6b231b436b64b5f46daad031 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 16:16:05 +0800 Subject: [PATCH 26/39] try to install boltztrap2 with optional --- .github/workflows/test.yml | 2 -- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd66089773f..6c61776fe0f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,8 +82,6 @@ jobs: uv pip install cython setuptools wheel - pip install boltztrap2 - uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} - name: pytest split ${{ matrix.split }} diff --git a/pyproject.toml b/pyproject.toml index 82189b09356..5e307669a2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,7 @@ ci = ["pytest-cov>=4", "pytest-split>=0.8", "pytest>=8"] docs = ["sphinx", "sphinx_rtd_theme"] optional = [ "ase>=3.23.0", - "BoltzTraP2>=24.7.2; platform_system!='Windows'", + "BoltzTraP2>=24.7.2", "chemview>=0.6", "chgnet>=0.3.8", "f90nml>=1.1.2", From 7849ad02f49763bac853679f4b89d9dc82722bc1 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 16:20:54 +0800 Subject: [PATCH 27/39] try to manually install bt2 in workflow --- .github/workflows/test.yml | 2 ++ pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c61776fe0f..f38b88d76b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,6 +82,8 @@ jobs: uv pip install cython setuptools wheel + uv pip install BoltzTraP2>=24.7.2 + uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} - name: pytest split ${{ matrix.split }} diff --git a/pyproject.toml b/pyproject.toml index 5e307669a2d..acfb90c454e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,7 @@ ci = ["pytest-cov>=4", "pytest-split>=0.8", "pytest>=8"] docs = ["sphinx", "sphinx_rtd_theme"] optional = [ "ase>=3.23.0", - "BoltzTraP2>=24.7.2", + # "BoltzTraP2>=24.7.2", # TODO: WIP "chemview>=0.6", "chgnet>=0.3.8", "f90nml>=1.1.2", From 1a8ba842ada7783ec29d099b7cee367dc8b78039 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 16:26:53 +0800 Subject: [PATCH 28/39] manually install bt2 with pip --- .github/workflows/test.yml | 4 +++- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f38b88d76b3..c3ee1d5d8b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,7 +82,9 @@ jobs: uv pip install cython setuptools wheel - uv pip install BoltzTraP2>=24.7.2 + # TODO: uv cannot install BoltzTraP2 (#3786), + # suggesting no NumPy when there is + pip install BoltzTraP2>=24.7.2 uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} diff --git a/pyproject.toml b/pyproject.toml index acfb90c454e..5e307669a2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,7 @@ ci = ["pytest-cov>=4", "pytest-split>=0.8", "pytest>=8"] docs = ["sphinx", "sphinx_rtd_theme"] optional = [ "ase>=3.23.0", - # "BoltzTraP2>=24.7.2", # TODO: WIP + "BoltzTraP2>=24.7.2", "chemview>=0.6", "chgnet>=0.3.8", "f90nml>=1.1.2", From f036a6fcc00086568a1fc601635ab3f5d05c7fb7 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 16:33:24 +0800 Subject: [PATCH 29/39] remove bt2 ver --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3ee1d5d8b2..7398f2d297f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,7 +84,7 @@ jobs: # TODO: uv cannot install BoltzTraP2 (#3786), # suggesting no NumPy when there is - pip install BoltzTraP2>=24.7.2 + pip install BoltzTraP2 uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} From 7f6bfb04ec97e45519bfda8b81da6a909494b064 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 16:42:50 +0800 Subject: [PATCH 30/39] install bt2 only on ubuntu --- .github/workflows/test.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7398f2d297f..04bd95eb522 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,7 +72,7 @@ jobs: run: | micromamba install -n pmg -c conda-forge enumlib packmol bader openbabel openff-toolkit --yes - - name: Install pymatgen and dependencies + - name: Install pymatgen dependencies run: | micromamba activate pmg @@ -82,10 +82,18 @@ jobs: uv pip install cython setuptools wheel + - name: Install BoltzTraP2 on Ubuntu + if: matrix.config.os == 'ubuntu-latest' + run: | + micromamba activate pmg # TODO: uv cannot install BoltzTraP2 (#3786), # suggesting no NumPy when there is pip install BoltzTraP2 + - name: Install pymatgen + run: | + micromamba activate pmg + uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} - name: pytest split ${{ matrix.split }} From d15c58c9b254fe675c2f8545a9c12a959b3818be Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 16:46:00 +0800 Subject: [PATCH 31/39] skip bt2 for windows --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5e307669a2d..0a418d89e40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,7 @@ ci = ["pytest-cov>=4", "pytest-split>=0.8", "pytest>=8"] docs = ["sphinx", "sphinx_rtd_theme"] optional = [ "ase>=3.23.0", - "BoltzTraP2>=24.7.2", + "BoltzTraP2>=24.7.2 ; platform_system != 'Windows'", "chemview>=0.6", "chgnet>=0.3.8", "f90nml>=1.1.2", From 1706c825de51d4fc21aea1f11ff098f36ae3a7c5 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 17:08:47 +0800 Subject: [PATCH 32/39] try to fix failing bt2 test --- .../electronic_structure/boltztrap2.py | 35 ++++++++++--------- tests/electronic_structure/test_boltztrap2.py | 2 ++ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/pymatgen/electronic_structure/boltztrap2.py b/src/pymatgen/electronic_structure/boltztrap2.py index 13d7891629e..e15cc40cce7 100644 --- a/src/pymatgen/electronic_structure/boltztrap2.py +++ b/src/pymatgen/electronic_structure/boltztrap2.py @@ -44,6 +44,7 @@ if TYPE_CHECKING: from pathlib import Path + from typing import Literal from typing_extensions import Self @@ -961,20 +962,20 @@ def __init__(self, bzt_transP=None, bzt_interp=None) -> None: def plot_props( self, - prop_y, - prop_x, - prop_z="temp", - output="avg_eigs", - dop_type="n", + prop_y: str, + prop_x: Literal["mu", "doping", "temp"], + prop_z: Literal["doping", "temp"] = "temp", + output: Literal["avg_eigs", "eigs"] = "avg_eigs", + dop_type: Literal["n", "p"] = "n", doping=None, temps=None, - xlim=(-2, 2), - ax: plt.Axes = None, - ): + xlim: tuple[float, float] = (-2, 2), + ax: plt.Axes | None = None, + ) -> plt.Axes | plt.Figure: """Plot the transport properties. Args: - prop_y: property to plot among ("Conductivity","Seebeck","Kappa","Carrier_conc", + prop_y: property to plot among ("Conductivity", "Seebeck", "Kappa", "Carrier_conc", "Hall_carrier_conc_trace"). Abbreviations are possible, like "S" for "Seebeck" prop_x: independent variable in the x-axis among ('mu','doping','temp') prop_z: third variable to plot multiple curves ('doping','temp') @@ -991,7 +992,9 @@ def plot_props( ax: figure.axes where to plot. If None, a new figure is produced. Returns: - plt.Axes: matplotlib Axes object + plt.Axes: matplotlib Axes object if ax provided + OR + plt.Figure: matplotlib Figure object if ax is None Example: bztPlotter.plot_props('S','mu','temp',temps=[600,900,1200]).show() @@ -1026,15 +1029,15 @@ def plot_props( r"$(cm^{-3})$", ) - props_short = [p[: len(prop_y)] for p in props] + props_short = tuple(p[: len(prop_y)] for p in props) if prop_y not in props_short: raise BoltztrapError("prop_y not valid") - if prop_x not in ("mu", "doping", "temp"): + if prop_x not in {"mu", "doping", "temp"}: raise BoltztrapError("prop_x not valid") - if prop_z not in ("doping", "temp"): + if prop_z not in {"doping", "temp"}: raise BoltztrapError("prop_z not valid") idx_prop = props_short.index(prop_y) @@ -1048,8 +1051,7 @@ def plot_props( else: p_array = getattr(self.bzt_transP, f"{props[idx_prop]}_{prop_x}") - if ax is None: - plt.figure(figsize=(10, 8)) + fig = plt.figure(figsize=(10, 8)) if ax is None else None temps_all = self.bzt_transP.temp_r.tolist() if temps is None: @@ -1140,7 +1142,8 @@ def plot_props( plt.legend(title=leg_title if leg_title != "" else "", fontsize=15) plt.tight_layout() plt.grid() - return ax + + return fig if ax is None else ax def plot_bands(self): """Plot a band structure on symmetry line using BSPlotter().""" diff --git a/tests/electronic_structure/test_boltztrap2.py b/tests/electronic_structure/test_boltztrap2.py index 35926215e2e..1746cd64b87 100644 --- a/tests/electronic_structure/test_boltztrap2.py +++ b/tests/electronic_structure/test_boltztrap2.py @@ -316,7 +316,9 @@ def test_plot(self): assert self.bztPlotter is not None fig = self.bztPlotter.plot_props("S", "mu", "temp", temps=[300, 500]) assert fig is not None + fig = self.bztPlotter.plot_bands() assert fig is not None + fig = self.bztPlotter.plot_dos() assert fig is not None From 3a3cd77a0f4a16436be4b49240a54137f79185fd Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 17:19:12 +0800 Subject: [PATCH 33/39] more descriptive skip msg --- tests/ext/test_cod.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ext/test_cod.py b/tests/ext/test_cod.py index 9a3164d03d0..56dd47568ba 100644 --- a/tests/ext/test_cod.py +++ b/tests/ext/test_cod.py @@ -11,7 +11,7 @@ if "CI" in os.environ: # test is slow and flaky, skip in CI. see # https://github.com/materialsproject/pymatgen/pull/3777#issuecomment-2071217785 - pytest.skip(allow_module_level=True) + pytest.skip(allow_module_level=True, reason="Skip COD test in CI") try: website_down = requests.get("https://www.crystallography.net", timeout=600).status_code != 200 From bbdf250dcb3d54806104fbe7ffe80771826463b5 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 17:19:41 +0800 Subject: [PATCH 34/39] finish typing of bzt2 --- src/pymatgen/electronic_structure/boltztrap2.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pymatgen/electronic_structure/boltztrap2.py b/src/pymatgen/electronic_structure/boltztrap2.py index e15cc40cce7..49a6a34b3e4 100644 --- a/src/pymatgen/electronic_structure/boltztrap2.py +++ b/src/pymatgen/electronic_structure/boltztrap2.py @@ -967,8 +967,8 @@ def plot_props( prop_z: Literal["doping", "temp"] = "temp", output: Literal["avg_eigs", "eigs"] = "avg_eigs", dop_type: Literal["n", "p"] = "n", - doping=None, - temps=None, + doping: list[float] | None = None, + temps: list[float] | None = None, xlim: tuple[float, float] = (-2, 2), ax: plt.Axes | None = None, ) -> plt.Axes | plt.Figure: @@ -1114,6 +1114,9 @@ def plot_props( leg_title = f"{dop_type}-type" elif prop_z == "doping" and prop_x == "temp": + if doping is None: + raise ValueError("doping cannot be None when prop_z is doping") + for dop in doping: dop_idx = doping_all.index(dop) prop_out = np.linalg.eigh(p_array[dop_type][:, dop_idx])[0] @@ -1139,7 +1142,7 @@ def plot_props( plt.ylabel(f"{props_lbl[idx_prop]} {props_unit[idx_prop]}", fontsize=30) plt.xticks(fontsize=25) plt.yticks(fontsize=25) - plt.legend(title=leg_title if leg_title != "" else "", fontsize=15) + plt.legend(title=leg_title or "", fontsize=15) plt.tight_layout() plt.grid() From b81a16370d9746fdd57103f5dec72bd704985f55 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 17:35:29 +0800 Subject: [PATCH 35/39] try to install pygraphviz --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 04bd95eb522..d8bf23021ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,7 +70,7 @@ jobs: - name: Install ubuntu-only conda dependencies if: matrix.config.os == 'ubuntu-latest' run: | - micromamba install -n pmg -c conda-forge enumlib packmol bader openbabel openff-toolkit --yes + micromamba install -n pmg -c conda-forge enumlib packmol bader openbabel openff-toolkit pygraphviz --yes - name: Install pymatgen dependencies run: | @@ -82,10 +82,11 @@ jobs: uv pip install cython setuptools wheel - - name: Install BoltzTraP2 on Ubuntu + - name: Install optional Ubuntu dependencies if: matrix.config.os == 'ubuntu-latest' run: | micromamba activate pmg + # TODO: uv cannot install BoltzTraP2 (#3786), # suggesting no NumPy when there is pip install BoltzTraP2 From c67abbc6678ebeee6a324440570aa38cc0c66adb Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 17:53:34 +0800 Subject: [PATCH 36/39] revert update to | replace for graphs --- src/pymatgen/analysis/graphs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pymatgen/analysis/graphs.py b/src/pymatgen/analysis/graphs.py index eda21ac92ef..a23ce49ef36 100644 --- a/src/pymatgen/analysis/graphs.py +++ b/src/pymatgen/analysis/graphs.py @@ -933,7 +933,7 @@ def draw_graph_to_file( d["label"] = f"{d['weight']:.2f} {units}" # update edge with our new style attributes - g.edges[u, v, k] |= d + g.edges[u, v, k].update(d) # optionally remove periodic image edges, # these can be confusing due to periodic boundaries @@ -2603,7 +2603,7 @@ def draw_graph_to_file( d["label"] = f"{d['weight']:.2f} {units}" # update edge with our new style attributes - g.edges[u, v, k] |= d + g.edges[u, v, k].update(d) # optionally remove periodic image edges, # these can be confusing due to periodic boundaries From 155cbff5e01ab2108a9bf831ec6f73004b85fb8a Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Mon, 5 Aug 2024 06:51:21 -0400 Subject: [PATCH 37/39] test.yml join install pymatgen and install dependencies steps --- .github/workflows/test.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8bf23021ef..dc2b8238851 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,11 +35,11 @@ jobs: resolution: highest extras: ci,optional - os: ubuntu-latest - python: '>3.9' + python: ">3.9" resolution: lowest-direct extras: ci,optional - os: macos-latest - python: '3.10' + python: "3.10" resolution: lowest-direct extras: ci # test with only required dependencies installed @@ -72,7 +72,7 @@ jobs: run: | micromamba install -n pmg -c conda-forge enumlib packmol bader openbabel openff-toolkit pygraphviz --yes - - name: Install pymatgen dependencies + - name: Install pymatgen and dependencies run: | micromamba activate pmg @@ -82,6 +82,8 @@ jobs: uv pip install cython setuptools wheel + uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} + - name: Install optional Ubuntu dependencies if: matrix.config.os == 'ubuntu-latest' run: | @@ -91,12 +93,6 @@ jobs: # suggesting no NumPy when there is pip install BoltzTraP2 - - name: Install pymatgen - run: | - micromamba activate pmg - - uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }} - - name: pytest split ${{ matrix.split }} run: | micromamba activate pmg From 57d34e2e297a0669534692cc9154dde1bc66dadf Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Mon, 5 Aug 2024 06:53:07 -0400 Subject: [PATCH 38/39] fix TestStructureGraph.test_draw unhashable type list error --- tests/analysis/test_graphs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/analysis/test_graphs.py b/tests/analysis/test_graphs.py index 232c8c4c7dd..a0935af1c9b 100644 --- a/tests/analysis/test_graphs.py +++ b/tests/analysis/test_graphs.py @@ -373,7 +373,7 @@ def test_draw(self): bc_square_sg_r.draw_graph_to_file(f"{self.tmp_path}/bc_square_r.pdf", algo="neato", image_labels=False) # ensure PDF files were created - pdfs = {path.split("/") for path in glob(f"{self.tmp_path}/*.pdf")} + pdfs = {path.split("/")[-1] for path in glob(f"{self.tmp_path}/*.pdf")} expected_pdfs = { "bc_square_r_single.pdf", "bc_square_r.pdf", From 5e242ebcae8f18ad422bfcd01d5ab4e17f35d771 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Mon, 5 Aug 2024 19:28:44 +0800 Subject: [PATCH 39/39] skip BoltzTraP2 and matplotlib 3.9.1 --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0a418d89e40..f56ecb39b41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,8 @@ ci = ["pytest-cov>=4", "pytest-split>=0.8", "pytest>=8"] docs = ["sphinx", "sphinx_rtd_theme"] optional = [ "ase>=3.23.0", - "BoltzTraP2>=24.7.2 ; platform_system != 'Windows'", + # TODO: uv cannot install BoltzTraP2 + # "BoltzTraP2>=24.7.2 ; platform_system != 'Windows'", "chemview>=0.6", "chgnet>=0.3.8", "f90nml>=1.1.2", @@ -104,7 +105,7 @@ optional = [ "jarvis-tools>=2020.7.14", "matgl>=1.1.1", # TODO: track https://github.com/matplotlib/matplotlib/issues/28551 - "matplotlib>=3.8,<3.9.1", + "matplotlib>=3.8,!=3.9.1", "netCDF4>=1.6.5", "phonopy>=2.23", "seekpath>=2.0.1",