From 286be51fb4e051f8b2bdb019ef56255c8dc82ca3 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Thu, 12 Dec 2024 16:48:38 +0800 Subject: [PATCH 1/5] skip another test --- tests/io/test_phonopy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/io/test_phonopy.py b/tests/io/test_phonopy.py index 802e43049e2..76d1ecda4d7 100644 --- a/tests/io/test_phonopy.py +++ b/tests/io/test_phonopy.py @@ -125,6 +125,10 @@ def test_structure_conversion(self): assert struct_pmg_round_trip.site_properties["magmom"] == struct_pmg.site_properties["magmom"] +@pytest.mark.skipif( + platform.system() == "Windows" and int(np.__version__[0]) >= 2, + reason="See https://github.com/conda-forge/phonopy-feedstock/pull/158#issuecomment-2227506701", +) @pytest.mark.skipif(Phonopy is None, reason="Phonopy not present") class TestGetDisplacedStructures(PymatgenTest): def test_get_displaced_structures(self): @@ -157,11 +161,11 @@ def test_get_displaced_structures(self): assert os.path.isfile("test.yaml") -@pytest.mark.skipif(Phonopy is None, reason="Phonopy not present") @pytest.mark.skipif( platform.system() == "Windows" and int(np.__version__[0]) >= 2, reason="See https://github.com/conda-forge/phonopy-feedstock/pull/158#issuecomment-2227506701", ) +@pytest.mark.skipif(Phonopy is None, reason="Phonopy not present") class TestPhonopyFromForceConstants(TestCase): def setUp(self) -> None: test_path = Path(TEST_DIR) From 51b822f4ed67dfd3ef395438c6ad1ca8e28b4f0d Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Thu, 12 Dec 2024 17:15:09 +0800 Subject: [PATCH 2/5] fix import --- tests/io/test_phonopy.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/io/test_phonopy.py b/tests/io/test_phonopy.py index 76d1ecda4d7..2dd442aed2b 100644 --- a/tests/io/test_phonopy.py +++ b/tests/io/test_phonopy.py @@ -10,12 +10,11 @@ from numpy.testing import assert_allclose, assert_array_equal from pytest import approx -from pymatgen.core import Element +from pymatgen.core import Element, Structure from pymatgen.io.phonopy import ( CompletePhononDos, PhononBandStructure, PhononBandStructureSymmLine, - Structure, get_complete_ph_dos, get_displaced_structures, get_gruneisen_ph_bs_symm_line, From 77c602b9b1a8633a1a0e6bad2de565a2d61ee50b Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Thu, 12 Dec 2024 17:27:26 +0800 Subject: [PATCH 3/5] update reason --- tests/io/test_phonopy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/io/test_phonopy.py b/tests/io/test_phonopy.py index 2dd442aed2b..0f20d54e474 100644 --- a/tests/io/test_phonopy.py +++ b/tests/io/test_phonopy.py @@ -126,7 +126,7 @@ def test_structure_conversion(self): @pytest.mark.skipif( platform.system() == "Windows" and int(np.__version__[0]) >= 2, - reason="See https://github.com/conda-forge/phonopy-feedstock/pull/158#issuecomment-2227506701", + reason="cannot run NP2 on windows, see PR 4224", ) @pytest.mark.skipif(Phonopy is None, reason="Phonopy not present") class TestGetDisplacedStructures(PymatgenTest): @@ -162,7 +162,7 @@ def test_get_displaced_structures(self): @pytest.mark.skipif( platform.system() == "Windows" and int(np.__version__[0]) >= 2, - reason="See https://github.com/conda-forge/phonopy-feedstock/pull/158#issuecomment-2227506701", + reason="cannot run NP2 on windows, see PR 4224", ) @pytest.mark.skipif(Phonopy is None, reason="Phonopy not present") class TestPhonopyFromForceConstants(TestCase): From b8912442b458ac6b409eaf0ae2ce423505a87218 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Thu, 12 Dec 2024 18:32:57 +0800 Subject: [PATCH 4/5] what? looks like the latest monty doesn't pack reverse readline fix? --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6736225f0e9..099497285cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -90,6 +90,9 @@ jobs: WHEEL_FILE=$(ls dist/pymatgen*.whl) uv pip install $WHEEL_FILE[${{matrix.config.extras}}] --resolution=${{matrix.config.resolution}} + # TODO: test monty fix for reverse readline + uv pip install git+https://github.com/materialsvirtuallab/monty.git@master + - name: Install optional Ubuntu dependencies if: matrix.config.os == 'ubuntu-latest' run: | From 3af8ad0c79ef52c231916638b4d9c9105c5575e2 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Thu, 12 Dec 2024 18:33:38 +0800 Subject: [PATCH 5/5] Revert "what? looks like the latest monty doesn't pack reverse readline fix?" This reverts commit b8912442b458ac6b409eaf0ae2ce423505a87218. --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 099497285cb..6736225f0e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -90,9 +90,6 @@ jobs: WHEEL_FILE=$(ls dist/pymatgen*.whl) uv pip install $WHEEL_FILE[${{matrix.config.extras}}] --resolution=${{matrix.config.resolution}} - # TODO: test monty fix for reverse readline - uv pip install git+https://github.com/materialsvirtuallab/monty.git@master - - name: Install optional Ubuntu dependencies if: matrix.config.os == 'ubuntu-latest' run: |