Skip to content

Commit

Permalink
[Hot Fix] Fix setuptools for pymatgen packaging (#3934)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielYang59 committed Jul 18, 2024
1 parent 0234182 commit 380d2f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 0 additions & 6 deletions tests/core/test_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 380d2f2

Please sign in to comment.