Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import copy
import json
import jsonschema
from .definitions_schema import get_definition
from .molecule_schema import molecule_schema
from .options_schema import options_schema
__all__ = ["get_schema", "get_table_indices", "get_schema_keys", "validate", "get_hash_fields", "format_result_indices"]
_schemas = {}
# Add in molecule
for req in molecule_schema["required_definitions"]:
molecule_schema["definitions"][req] = get_definition(req)
_schemas["molecule"] = molecule_schema
_schemas["options"] = options_schema
# Load molecule schema
# Collection and hash indices
_table_indices = {
"collection": ("collection", "name"),
"procedure": ("procedure", "program"),
"molecule": ("molecule_hash", "molecular_formula"),
"result": ("molecule_id", "program", "driver", "method", "basis", "options"),
"options": ("program", "name"),