From 380d2f2b91b5d938d13b388adf714bcc0b3f2b66 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Thu, 18 Jul 2024 19:41:16 +0800 Subject: [PATCH] [Hot Fix] Fix `setuptools` for pymatgen packaging (#3934) --- pyproject.toml | 5 ++++- tests/core/test_structure.py | 6 ------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d3272d1b437..d10b59d4f18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -131,9 +131,12 @@ feff_plot_cross_section = "pymatgen.cli.feff_plot_cross_section:main" feff_plot_dos = "pymatgen.cli.feff_plot_dos:main" get_environment = "pymatgen.cli.get_environment:main" +[tool.setuptools] +include-package-data = false + [tool.setuptools.packages.find] where = ["src"] -include = ["pymatgen"] +include = ["pymatgen", "pymatgen.*"] [tool.setuptools.package-data] "pymatgen.analysis" = ["*.yaml", "*.json", "*.csv"] diff --git a/tests/core/test_structure.py b/tests/core/test_structure.py index ded309c74aa..20769d9cde0 100644 --- a/tests/core/test_structure.py +++ b/tests/core/test_structure.py @@ -1768,7 +1768,6 @@ def test_relax_ase_opt_kwargs(self): assert traj[0] != traj[-1] assert os.path.isfile(traj_file) - @pytest.mark.skip("TODO remove skip once https://github.com/materialsvirtuallab/matgl/issues/238 is resolved") def test_calculate_m3gnet(self): pytest.importorskip("matgl") calculator = self.get_structure("Si").calculate() @@ -1780,7 +1779,6 @@ def test_calculate_m3gnet(self): assert np.linalg.norm(calculator.results["forces"]) == approx(7.8123485e-06, abs=0.2) assert np.linalg.norm(calculator.results["stress"]) == approx(1.7861567, abs=2) - @pytest.mark.skip("TODO remove skip once https://github.com/materialsvirtuallab/matgl/issues/238 is resolved") def test_relax_m3gnet(self): matgl = pytest.importorskip("matgl") struct = self.get_structure("Si") @@ -1791,7 +1789,6 @@ def test_relax_m3gnet(self): actual = relaxed.dynamics[key] assert actual == val, f"expected {key} to be {val}, {actual=}" - @pytest.mark.skip("TODO remove skip once https://github.com/materialsvirtuallab/matgl/issues/238 is resolved") def test_relax_m3gnet_fixed_lattice(self): matgl = pytest.importorskip("matgl") struct = self.get_structure("Si") @@ -1800,7 +1797,6 @@ def test_relax_m3gnet_fixed_lattice(self): assert isinstance(relaxed.calc, matgl.ext.ase.M3GNetCalculator) assert relaxed.dynamics["optimizer"] == "BFGS" - @pytest.mark.skip("TODO remove skip once https://github.com/materialsvirtuallab/matgl/issues/238 is resolved") def test_relax_m3gnet_with_traj(self): pytest.importorskip("matgl") struct = self.get_structure("Si") @@ -2406,8 +2402,6 @@ def test_relax_ase_mol_return_traj(self): assert traj[0] != traj[-1] assert os.path.isfile(traj_file) - # TODO remove skip once https://github.com/tblite/tblite/issues/110 is fixed - @pytest.mark.skip("Pytorch and TBLite clash. https://github.com/materialsproject/pymatgen/pull/3060") def test_calculate_gfnxtb(self): pytest.importorskip("tblite") mol_copy = self.mol.copy()