Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions emmet-api/tests/materials/summary/test_query_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
SearchESQuery,
)

from emmet.core.summary import SummaryStats
from emmet.core.summary import SummaryDoc, SummaryStats

from pymatgen.analysis.magnetism import Ordering
from emmet.core.summary import SummaryDoc


def test_has_props_query():
Expand Down
6 changes: 5 additions & 1 deletion emmet-builders/emmet/builders/abinit/phonon.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import tempfile
from math import ceil
from typing import Iterator

import numpy as np
from abipy.abio.inputs import AnaddbInput
Expand Down Expand Up @@ -36,6 +35,11 @@
from emmet.core.polar import BornEffectiveCharges, DielectricDoc, IRDielectric
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterator

SETTINGS = EmmetBuildSettings()


Expand Down
6 changes: 5 additions & 1 deletion emmet-builders/emmet/builders/abinit/sound_velocity.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import tempfile
import traceback
from math import ceil
from typing import Iterator

from abipy.dfpt.ddb import DdbFile
from abipy.dfpt.vsound import SoundVelocity as AbiSoundVelocity
Expand All @@ -13,6 +12,11 @@
from emmet.core.phonon import SoundVelocity
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterator


class SoundVelocityBuilder(Builder):
def __init__(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import annotations
from math import ceil
from typing import Iterator

import numpy as np
from maggma.builders import Builder
Expand All @@ -10,6 +10,11 @@
from emmet.core.absorption import AbsorptionDoc
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterator


class AbsorptionBuilder(Builder):
def __init__(
Expand Down
8 changes: 7 additions & 1 deletion emmet-builders/emmet/builders/materials/corrected_entries.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from __future__ import annotations

import copy
import warnings
from collections import defaultdict
from datetime import datetime
from itertools import chain
from math import ceil
from typing import Iterable, Iterator

from maggma.core import Builder, Store
from maggma.utils import grouper
Expand All @@ -16,6 +17,11 @@
from emmet.core.thermo import ThermoType
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterable, Iterator


class CorrectedEntriesBuilder(Builder):
def __init__(
Expand Down
8 changes: 7 additions & 1 deletion emmet-builders/emmet/builders/materials/dielectric.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

from math import ceil
from typing import Iterator

import numpy as np
from maggma.builders import Builder
Expand All @@ -10,6 +11,11 @@
from emmet.core.polar import DielectricDoc
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterator


class DielectricBuilder(Builder):
def __init__(
Expand Down
9 changes: 8 additions & 1 deletion emmet-builders/emmet/builders/materials/elasticity.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
7. Fit the elastic tensor.
"""

from __future__ import annotations

from datetime import datetime
from typing import Any, Generator

import numpy as np
from maggma.core import Builder, Store
Expand All @@ -33,6 +34,12 @@
from emmet.core.utils import jsanitize
from emmet.core.vasp.calc_types import CalcType

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Generator
from typing import Any


class ElasticityBuilder(Builder):
def __init__(
Expand Down
7 changes: 6 additions & 1 deletion emmet-builders/emmet/builders/materials/electrodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from functools import lru_cache
from itertools import chain
from math import ceil
from typing import Any, Iterator

from maggma.builders import Builder
from maggma.stores import MongoStore
Expand All @@ -18,6 +17,12 @@
from emmet.core.structure_group import StructureGroupDoc, _get_id_lexi
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from typing import Any
from collections.abc import Iterator


def s_hash(el):
return el.data["comp_delith"]
Expand Down
8 changes: 7 additions & 1 deletion emmet-builders/emmet/builders/materials/magnetism.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

from math import ceil
from typing import Iterator

from maggma.builders import Builder
from maggma.stores import Store
Expand All @@ -9,6 +10,11 @@
from emmet.core.magnetism import MagnetismDoc
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterator

__author__ = "Shyam Dwaraknath <shyamd@lbl.gov>, Matthew Horton <mkhorton@lbl.gov>"


Expand Down
6 changes: 5 additions & 1 deletion emmet-builders/emmet/builders/materials/optimade.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from math import ceil
from typing import Iterator

from maggma.builders import Builder
from maggma.core import Store
Expand All @@ -9,6 +8,11 @@
from emmet.core.optimade import OptimadeMaterialsDoc
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterator


class OptimadeMaterialsBuilder(Builder):
def __init__(
Expand Down
6 changes: 5 additions & 1 deletion emmet-builders/emmet/builders/materials/provenance.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from collections import defaultdict
from datetime import datetime
from math import ceil
from typing import Iterable

from maggma.core import Builder, Store
from maggma.utils import grouper
Expand All @@ -12,6 +11,11 @@
from emmet.core.provenance import ProvenanceDoc, SNLDict
from emmet.core.utils import get_sg, jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterable


class ProvenanceBuilder(Builder):
def __init__(
Expand Down
10 changes: 8 additions & 2 deletions emmet-builders/emmet/builders/materials/thermo.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import annotations

import warnings
from datetime import datetime
from itertools import chain
from math import ceil
from typing import Iterator, Set

from maggma.core import Builder, Store
from maggma.stores import S3Store
Expand All @@ -15,6 +16,11 @@
from emmet.core.thermo import PhaseDiagramDoc, ThermoDoc
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterator


class ThermoBuilder(Builder):
def __init__(
Expand Down Expand Up @@ -49,7 +55,7 @@ def __init__(
self.phase_diagram = phase_diagram
self.num_phase_diagram_eles = num_phase_diagram_eles
self.chunk_size = chunk_size
self._completed_tasks: Set[str] = set()
self._completed_tasks: set[str] = set()

if self.thermo.key != "thermo_id":
warnings.warn(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import itertools
from itertools import combinations
from math import ceil
from typing import Iterator

from maggma.core import Builder
from maggma.stores import MongoStore, MongoURIStore, S3Store
from maggma.utils import grouper
from pymatgen.core import Composition, Element

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterator


class MissingCompositionsBuilder(Builder):
"""
Expand Down
8 changes: 7 additions & 1 deletion emmet-builders/emmet/builders/molecules/atomic.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import annotations

from collections import defaultdict
from datetime import datetime
from itertools import chain
from math import ceil
from typing import Iterable, Iterator

from maggma.builders import Builder
from maggma.core import Store
Expand All @@ -19,6 +20,11 @@
from emmet.core.qchem.task import TaskDocument
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterable, Iterator

__author__ = "Evan Spotte-Smith"

SETTINGS = EmmetBuildSettings()
Expand Down
8 changes: 7 additions & 1 deletion emmet-builders/emmet/builders/molecules/bonds.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import annotations

from collections import defaultdict
from datetime import datetime
from itertools import chain
from math import ceil
from typing import Iterable, Iterator

from maggma.builders import Builder
from maggma.core import Store
Expand All @@ -14,6 +15,11 @@
from emmet.core.qchem.task import TaskDocument
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterable, Iterator

__author__ = "Evan Spotte-Smith"

SETTINGS = EmmetBuildSettings()
Expand Down
8 changes: 7 additions & 1 deletion emmet-builders/emmet/builders/molecules/electric.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import annotations

from collections import defaultdict
from datetime import datetime
from itertools import chain
from math import ceil
from typing import Iterable, Iterator

from maggma.builders import Builder
from maggma.core import Store
Expand All @@ -14,6 +15,11 @@
from emmet.core.qchem.task import TaskDocument
from emmet.core.utils import jsanitize

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Iterable, Iterator

__author__ = "Evan Spotte-Smith"

SETTINGS = EmmetBuildSettings()
Expand Down
7 changes: 6 additions & 1 deletion emmet-builders/emmet/builders/molecules/metal_binding.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from __future__ import annotations

import copy
from datetime import datetime
from itertools import chain
from math import ceil
from typing import Iterable, Iterator
from typing import TYPE_CHECKING

from maggma.builders import Builder
from maggma.core import Store
Expand All @@ -18,6 +20,9 @@
from emmet.core.qchem.molecule import MoleculeDoc
from emmet.core.utils import jsanitize

if TYPE_CHECKING:
from collections.abc import Iterable, Iterator

__author__ = "Evan Spotte-Smith"

SETTINGS = EmmetBuildSettings()
Expand Down
7 changes: 6 additions & 1 deletion emmet-builders/emmet/builders/molecules/orbitals.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from __future__ import annotations

from collections import defaultdict
from datetime import datetime
from itertools import chain
from math import ceil
from typing import Iterable, Iterator
from typing import TYPE_CHECKING

from maggma.builders import Builder
from maggma.core import Store
Expand All @@ -14,6 +16,9 @@
from emmet.core.qchem.task import TaskDocument
from emmet.core.utils import jsanitize

if TYPE_CHECKING:
from collections.abc import Iterable, Iterator

__author__ = "Evan Spotte-Smith"

SETTINGS = EmmetBuildSettings()
Expand Down
Loading
Loading