Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed Nov 13, 2023
1 parent 0e1223b commit d104c8d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions emmet-api/emmet/api/routes/materials/materials/hint_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class MaterialsHintScheme(HintScheme):

def generate_hints(self, query):
hints = {"count_hint": {"deprecated": 1, "builder_meta.license": 1}}

for param in query["criteria"]:
if "nelements" in param:
hints["count_hint"]= {"nelements": 1}
hints["count_hint"] = {"nelements": 1}

hints["agg_hint"] = hints["count_hint"]
return hints
return hints
3 changes: 2 additions & 1 deletion emmet-builders/emmet/builders/materials/corrected_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Dict, Iterable, Iterator, List, Optional
from math import ceil
import copy
from datetime import datetime

from maggma.core import Builder, Store
from maggma.utils import grouper
Expand Down Expand Up @@ -310,7 +311,7 @@ def _get_chemsys_to_process(self):
if (chemsys not in corrected_entries_chemsys_dates)
or (
materials_chemsys_dates[chemsys]
> corrected_entries_chemsys_dates[chemsys]
> datetime.fromisoformat(corrected_entries_chemsys_dates[chemsys])
)
]

Expand Down
4 changes: 3 additions & 1 deletion emmet-core/emmet/core/vasp/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,9 @@ def from_vasp_files(
ddec6 = None
if run_ddec6 and VaspObject.CHGCAR in output_file_paths:
densities_path = run_ddec6 if isinstance(run_ddec6, (str, Path)) else None
ddec6 = ChargemolAnalysis(path=dir_name, atomic_densities_path=densities_path).summary
ddec6 = ChargemolAnalysis(
path=dir_name, atomic_densities_path=densities_path
).summary

locpot = None
if average_locpot:
Expand Down

0 comments on commit d104c8d

Please sign in to comment.