Skip to content

Commit ebb6dc7

Browse files
authored
Merge pull request #741 from janosh/fix-m1-install
Require minimum maggma version 0.39.0
2 parents ac89978 + e3157d2 commit ebb6dc7

File tree

9 files changed

+19
-32
lines changed

9 files changed

+19
-32
lines changed

atomate/qchem/drones.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import json
55
import os
66
import traceback
7-
from collections import OrderedDict
87
from fnmatch import fnmatch
98
from itertools import chain
109

@@ -119,10 +118,10 @@ def filter_files(self, path, file_pattern):
119118
file_pattern (string): base files to be searched for
120119
121120
Returns:
122-
OrderedDict of the names of the files to be processed further.
123-
The key is set from list of run types: self.runs
121+
dict: names of the files to be processed further. The key is set from list
122+
of run types: self.runs
124123
"""
125-
processed_files = OrderedDict()
124+
processed_files = {}
126125
files = os.listdir(path)
127126
for r in self.runs:
128127
# try subfolder schema

atomate/utils/tests/test_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,6 @@ def test_get_database(self):
123123

124124
db = get_database(os.path.join(MODULE_DIR, "db.json"))
125125
self.assertTrue(isinstance(db, Database))
126-
self.assertEqual(db.client.address[0], "localhost")
127126
self.assertEqual(db.name, "atomate_unittest")
127+
db.client.start_session() # needed to start the connection and populate db.client.address
128+
self.assertEqual(db.client.address, ("localhost", 27017))

atomate/vasp/drones.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import re
1212
import traceback
1313
import warnings
14-
from collections import OrderedDict
1514
from fnmatch import fnmatch
1615

1716
import numpy as np
@@ -235,10 +234,10 @@ def filter_files(self, path, file_pattern="vasprun.xml"):
235234
file_pattern (string): files to be searched for
236235
237236
Returns:
238-
OrderedDict of the names of the files to be processed further.
239-
The key is set from list of run types: self.runs
237+
dict: names of the files to be processed further. The key is set from list
238+
of run types: self.runs
240239
"""
241-
processed_files = OrderedDict()
240+
processed_files = {}
242241
files = os.listdir(path)
243242
for r in self.runs:
244243
# try subfolder schema

atomate/vasp/firetasks/parse_outputs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ def nested_copy(a):
12811281
summaries.append(summary)
12821282

12831283
mmdb.collection = mmdb.db["hubbard_hund_linresp"]
1284-
mmdb.collection.insert(summaries)
1284+
mmdb.collection.insert_many(summaries)
12851285

12861286
logger.info("Hubbard-Hund linear response analysis is complete.")
12871287

@@ -1507,7 +1507,7 @@ def run_task(self, fw_spec):
15071507
summaries.append(summary)
15081508

15091509
mmdb.collection = mmdb.db["magnetic_orderings"]
1510-
mmdb.collection.insert(summaries)
1510+
mmdb.collection.insert_many(summaries)
15111511

15121512
logger.info("Magnetic orderings calculation complete.")
15131513

atomate/vasp/firetasks/tests/test_polarization_to_db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ def test_polarizationtodb(self):
3434

3535
coll = bson.decode_all(coll_raw)
3636

37-
db = self.get_task_collection()
37+
task_coll = self.get_task_collection()
3838
for c in coll:
39-
db.insert(c)
39+
task_coll.insert_one(c)
4040

4141
new_fw_spec = {
4242
"_fw_env": {"db_file": os.path.join(db_dir, "db.json")},

atomate/vasp/submission_filter.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,8 @@
77

88
class SubmissionFilter(AbstractStructureFilter):
99
NO_POTCARS = [
10-
"Po",
11-
"At",
12-
"Rn",
13-
"Fr",
14-
"Ra",
15-
"Am",
16-
"Cm",
17-
"Bk",
18-
"Cf",
19-
"Es",
20-
"Fm",
21-
"Md",
22-
"No",
23-
"Lr",
10+
*["Po", "At", "Rn", "Fr", "Ra", "Am", "Cm"],
11+
*["Bk", "Cf", "Es", "Fm", "Md", "No", "Lr"],
2412
]
2513

2614
def __init__(

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
custodian==2022.1.17
22
FireWorks==1.9.7
3-
maggma==0.29.2
3+
maggma==0.39.0
44
monty==2021.6.10
55
networkx==2.5.1
66
numpy
@@ -9,7 +9,7 @@ paramiko==2.7.2
99
pydash==5.0.0
1010
pymatgen-analysis-diffusion
1111
pymatgen
12-
pymongo<4.0.0
12+
pymongo
1313
pyyaml==5.4.1
1414
ruamel.yaml==0.17.9
1515
scipy==1.7.0

scripts/atwf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ from pymatgen.core import Lattice, Structure
1414
from pymatgen.ext.matproj import MPRester
1515
from pymatgen.util.testing import PymatgenTest
1616

17+
from atomate.common.powerups import add_namefile, add_tags
1718
from atomate.utils.utils import get_wf_from_spec_dict, load_class
18-
from atomate.vasp.powerups import add_namefile, add_tags
1919
from atomate.vasp.workflows.presets import core
2020

2121
default_yaml = """fireworks:

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
install_requires=[
2525
"custodian>=2019.8.24",
2626
"FireWorks>=1.4.0",
27-
"maggma>=0.26.0",
27+
"maggma>=0.39.0",
2828
"monty>=2.0.6",
2929
"networkx",
3030
"numpy",
@@ -33,7 +33,7 @@
3333
"pydash>=4.1.0",
3434
"pymatgen-analysis-diffusion",
3535
"pymatgen",
36-
"pymongo<4.0.0",
36+
"pymongo",
3737
"pyyaml>=5.1.2",
3838
"ruamel.yaml",
3939
"scipy",

0 commit comments

Comments
 (0)