Skip to content

Commit 4b71309

Browse files
dependabot[bot]JaGeotpurcell90
authored
Bump lobsterpy from 0.4.5 to 0.4.9 (#1001)
* Bump lobsterpy from 0.4.5 to 0.4.9 Bumps [lobsterpy](https://github.com/JaGeo/LobsterPy) from 0.4.5 to 0.4.9. - [Release notes](https://github.com/JaGeo/LobsterPy/releases) - [Changelog](https://github.com/JaGeo/LobsterPy/blob/main/CHANGELOG.md) - [Commits](JaGeo/LobsterPy@v0.4.5...v0.4.9) --- updated-dependencies: - dependency-name: lobsterpy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Update pyproject.toml * switch to one matches * switch to molecule matcher * make tests as strict as they need to be again * remove unused import * test pymatgen master * Fix phonon workflow (#1005) it failed because of using the old interface in atomate2 * new pymatgen version --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: J. George <[email protected]> Co-authored-by: JaGeo <[email protected]> Co-authored-by: Thomas Purcell <[email protected]>
1 parent fb9a6e8 commit 4b71309

File tree

3 files changed

+18
-24
lines changed

3 files changed

+18
-24
lines changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies = [
3434
"numpy",
3535
"pydantic-settings>=2.0.3",
3636
"pydantic>=2.0.1",
37-
"pymatgen>=2024.6.4",
37+
"pymatgen>=2024.10.3",
3838
]
3939

4040
[project.optional-dependencies]
@@ -99,7 +99,7 @@ strict = [
9999
"emmet-core==0.84.2",
100100
"ijson==3.3.0",
101101
"jobflow==0.1.18",
102-
"lobsterpy==0.4.5",
102+
"lobsterpy==0.4.9",
103103
"mdanalysis==2.7.0",
104104
"monty==2024.7.30",
105105
"mp-api==0.42.2",
@@ -110,7 +110,7 @@ strict = [
110110
"pydantic-settings==2.5.2",
111111
"pydantic==2.9.2",
112112
"pymatgen-analysis-defects==2024.7.19",
113-
"pymatgen==2024.6.10",
113+
"pymatgen==2024.10.3",
114114
"python-ulid==2.7.0",
115115
"seekpath==2.1.0",
116116
"tblite==0.3.0; python_version < '3.12'",

tests/aims/test_flows/test_phonon_workflow.py

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
"""Test various makers"""
22

33
import json
4-
import os
54

65
import pytest
76

8-
cwd = os.getcwd()
97

10-
11-
def test_phonon_flow(si, tmp_path, mock_aims, species_dir):
8+
def test_phonon_flow(si, clean_dir, mock_aims, species_dir):
129
import numpy as np
1310
from jobflow import run_locally
1411
from pymatgen.io.aims.sets.core import StaticSetGenerator
@@ -57,9 +54,7 @@ def test_phonon_flow(si, tmp_path, mock_aims, species_dir):
5754
)
5855

5956
# run the flow or job and ensure that it finished running successfully
60-
os.chdir(tmp_path)
6157
responses = run_locally(flow, create_folders=True, ensure_success=True)
62-
os.chdir(cwd)
6358

6459
# validation the outputs of the job
6560
output = responses[flow.job_uuids[-1]][1].output
@@ -100,7 +95,7 @@ def test_phonon_flow(si, tmp_path, mock_aims, species_dir):
10095

10196

10297
@pytest.mark.skip(reason="Currently not mocked and needs FHI-aims binary")
103-
def test_phonon_socket_flow(si, tmp_path, mock_aims, species_dir):
98+
def test_phonon_socket_flow(si, clean_dir, mock_aims, species_dir):
10499
import numpy as np
105100
from jobflow import run_locally
106101
from pymatgen.io.aims.sets.core import StaticSetGenerator
@@ -153,9 +148,7 @@ def test_phonon_socket_flow(si, tmp_path, mock_aims, species_dir):
153148
)
154149

155150
# run the flow or job and ensure that it finished running successfully
156-
os.chdir(tmp_path)
157151
responses = run_locally(flow, create_folders=True, ensure_success=True)
158-
os.chdir(cwd)
159152

160153
# validation the outputs of the job
161154
output = responses[flow.job_uuids[-1]][1].output
@@ -194,9 +187,10 @@ def test_phonon_socket_flow(si, tmp_path, mock_aims, species_dir):
194187
assert np.round(output.phonon_bandstructure.bands[-1, 0], 2) == 14.41
195188

196189

197-
def test_phonon_default_flow(si, tmp_path, mock_aims, species_dir):
190+
def test_phonon_default_flow(si, clean_dir, mock_aims, species_dir):
198191
import numpy as np
199192
from jobflow import run_locally
193+
from pymatgen.core import SETTINGS
200194

201195
from atomate2.aims.flows.phonons import PhononMaker
202196

@@ -213,8 +207,8 @@ def test_phonon_default_flow(si, tmp_path, mock_aims, species_dir):
213207
# automatically use fake FHI-aims
214208
mock_aims(ref_paths, fake_run_aims_kwargs)
215209

216-
aims_sd = os.environ.get("AIMS_SPECIES_DIR")
217-
os.environ["AIMS_SPECIES_DIR"] = str(species_dir / "light")
210+
aims_sd = SETTINGS.get("AIMS_SPECIES_DIR")
211+
SETTINGS["AIMS_SPECIES_DIR"] = str(species_dir / "light")
218212

219213
maker = PhononMaker()
220214
maker.name = "phonons"
@@ -224,9 +218,7 @@ def test_phonon_default_flow(si, tmp_path, mock_aims, species_dir):
224218
)
225219

226220
# run the flow or job and ensure that it finished running successfully
227-
os.chdir(tmp_path)
228221
responses = run_locally(flow, create_folders=True, ensure_success=True)
229-
os.chdir(cwd)
230222

231223
# validation the outputs of the job
232224
output = responses[flow.job_uuids[-1]][1].output
@@ -265,18 +257,19 @@ def test_phonon_default_flow(si, tmp_path, mock_aims, species_dir):
265257
assert np.round(output.phonon_bandstructure.bands[-1, 0], 2) == 15.02
266258

267259
if aims_sd is not None:
268-
os.environ["AIMS_SPECIES_DIR"] = aims_sd
260+
SETTINGS["AIMS_SPECIES_DIR"] = aims_sd
269261

270262

271263
@pytest.mark.skip(reason="Currently not mocked and needs FHI-aims binary")
272-
def test_phonon_default_socket_flow(si, tmp_path, mock_aims, species_dir):
264+
def test_phonon_default_socket_flow(si, clean_dir, mock_aims, species_dir):
273265
import numpy as np
274266
from jobflow import run_locally
267+
from pymatgen.core import SETTINGS
275268

276269
from atomate2.aims.flows.phonons import PhononMaker
277270

278-
aims_sd = os.environ.get("AIMS_SPECIES_DIR")
279-
os.environ["AIMS_SPECIES_DIR"] = str(species_dir / "light")
271+
aims_sd = SETTINGS.get("AIMS_SPECIES_DIR")
272+
SETTINGS["AIMS_SPECIES_DIR"] = str(species_dir / "light")
280273

281274
# mapping from job name to directory containing test files
282275
ref_paths = {
@@ -301,9 +294,7 @@ def test_phonon_default_socket_flow(si, tmp_path, mock_aims, species_dir):
301294
)
302295

303296
# run the flow or job and ensure that it finished running successfully
304-
os.chdir(tmp_path)
305297
responses = run_locally(flow, create_folders=True, ensure_success=True)
306-
os.chdir(cwd)
307298

308299
# validation the outputs of the job
309300
output = responses[flow.job_uuids[-1]][1].output
@@ -343,4 +334,4 @@ def test_phonon_default_socket_flow(si, tmp_path, mock_aims, species_dir):
343334
assert np.round(output.phonon_bandstructure.bands[-1, 0], 2) == 15.02
344335

345336
if aims_sd is not None:
346-
os.environ["AIMS_SPECIES_DIR"] = aims_sd
337+
SETTINGS["AIMS_SPECIES_DIR"] = aims_sd

tests/ase/test_jobs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_lennard_jones_static_maker(lj_fcc_ne_pars, fcc_ne_structure):
4545
assert output.output.energy == pytest.approx(-0.0179726955438795)
4646
assert output.structure.volume == pytest.approx(24.334)
4747
assert isinstance(output, AseStructureTaskDoc)
48+
output.structure.properties = fcc_ne_structure.properties
4849
assert output.structure == fcc_ne_structure
4950

5051

@@ -102,4 +103,6 @@ def test_gfn_xtb_static_maker(h2o_3uud_trimer):
102103

103104
assert output.output.energy_per_atom == pytest.approx(-46.05920227158222)
104105
assert isinstance(output, AseMoleculeTaskDoc)
106+
107+
output.molecule.properties = h2o_3uud_trimer.properties
105108
assert output.molecule == h2o_3uud_trimer

0 commit comments

Comments
 (0)