Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmshn committed Mar 5, 2021
1 parent c48bdd7 commit c494ba7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
24 changes: 1 addition & 23 deletions emmet-builders/emmet/builders/vasp/thermo.py
Expand Up @@ -102,24 +102,6 @@ def get_items(self) -> Iterator[List[Dict]]:
for chemsys in sorted(to_process_chemsys, key=lambda x: len(x.split("-"))):
entries = self.get_entries(chemsys)
yield entries
# # build sandbox sets: ["a"] , ["a","b"], ["core","a","b"]
# sandbox_sets = set(
# [frozenset(entry.data.get("sandboxes", {})) for entry in entries]
# )
# sandbox_sets = maximal_spanning_non_intersecting_subsets(sandbox_sets)
# self.logger.debug(f"Found {len(sandbox_sets)}: {sandbox_sets}")
#
# for sandboxes in sandbox_sets:
# # only yield maximal subsets so that we can process a equivalent sandbox combinations at a time
# sandbox_entries = [
# entry
# for entry in entries
# if all(
# sandbox in entry.data.get("_sbxn", []) for sandbox in sandboxes
# )
# ]
#
# yield sandboxes, sandbox_entries

def process_item(self, item: Tuple[List[str], List[ComputedEntry]]):

Expand Down Expand Up @@ -176,10 +158,6 @@ def update_targets(self, items):
"""
# flatten out lists
items = list(filter(None, chain.from_iterable(items)))
# check for duplicates within this set
# items = list(
# {(v[self.thermo.key], frozenset(v["sandboxes"])): v for v in items}.values()
# )
# Check if already updated this run
items = [i for i in items if i[self.thermo.key] not in self._completed_tasks]

Expand Down Expand Up @@ -229,7 +207,7 @@ def get_entries(self, chemsys: str) -> List[Dict]:
new_q["deprecated"] = False
materials_docs = list(
self.materials.query(
criteria=new_q, properties=[self.materials.key, "entries", "structure"]
criteria=new_q, properties=[self.materials.key, "entries"]
)
)

Expand Down
4 changes: 1 addition & 3 deletions emmet-core/emmet/core/settings.py
Expand Up @@ -76,13 +76,11 @@ class Config:
extra = "ignore"

@root_validator(pre=True)
def load_default_settings(cls, values: dict = None):
def load_default_settings(cls, values):
"""
Loads settings from a root file if available and uses that as defaults in
place of built in defaults
"""
if values is None:
values = dict()
config_file_path: str = values.get("config_file", DEFAULT_CONFIG_FILE_PATH)

new_values = {}
Expand Down

0 comments on commit c494ba7

Please sign in to comment.