Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from propnet.dbtools.storage import StorageQuantity
from propnet.core.materials import Material
from propnet.core.graph import Graph
from propnet.core.provenance import ProvenanceElement
from propnet.ext.matproj import MPRester
import pydash
from multiprocessing import current_process
# noinspection PyUnresolvedReferences
import propnet.models
# noinspection PyUnresolvedReferences
import propnet.symbols
from propnet.core.registry import Registry
class PropnetBuilder(MapBuilder):
"""
Basic builder for running propnet derivations on various properties
"""
def __init__(self, materials, propstore, materials_symbol_map=None,
criteria=None, source_name="", include_deprecated=False,
include_sandboxed=False, graph_parallel=False,
max_graph_workers=None, graph_timeout=None,
allow_child_process=False, **kwargs):
"""
Args:
materials (Store): store of materials properties
materials_symbol_map (dict): mapping of keys in materials
store docs to symbols
propstore (Store): store of propnet properties
criteria (dict): criteria for Mongodb find() query specifying