diff --git a/emmet-api/emmet/api/core/documentation.py b/emmet-api/emmet/api/core/documentation.py index 87051e8c1e..1d99d77f40 100644 --- a/emmet-api/emmet/api/core/documentation.py +++ b/emmet-api/emmet/api/core/documentation.py @@ -190,7 +190,7 @@ Project database. See the `SurfacePropDoc` schema for a full list of fields returned by this route.", }, { - "name": "Robocrystallographer", + "name": "Materials Robocrystallographer", "description": "Route providing a computed text description for a material following the \ methodology discussed by [Ganose *et al.*](https://doi.org/10.1557/mrc.2019.94) \ Note that descriptions may not been calculated for all materials in the Materials \ @@ -204,11 +204,12 @@ Project database. See the `SynthesisSearchResultModel` schema for a full list of fields returned by this route.", }, { - "name": "Electrodes", + "name": "Materials Electrodes", "description": "Route providing computed electrode data for a material following the \ methodology discussed by [Shen *et al.*](https://doi.org/10.1038/s41524-020-00422-3) \ Note that electrode data has not been calculated for all materials in the Materials \ - Project database. See the `InsertionElectrodeDoc` schema for a full list of fields returned by this route.", + Project database. See the `InsertionElectrodeDoc` and `ConversionElectrodeDoc` schema \ + for a full list of fields returned by this route.", }, { "name": "Materials Oxidation States", @@ -238,6 +239,10 @@ "belong to, following the methodolgy discussed by " "[Woods-Robinson, Horton and Persson](https://arxiv.org/pdf/2206.10715).", }, + { + "name": "Materials Bonds", + "description": "Route for retrevial of bonding information for a given material.", + }, { "name": "MPComplete", "description": "Route for submitting structures to the Materials Project. If calculations are run with the \ diff --git a/emmet-api/emmet/api/routes/dois/resources.py b/emmet-api/emmet/api/routes/dois/resources.py index 60604e9981..59ce60a993 100644 --- a/emmet-api/emmet/api/routes/dois/resources.py +++ b/emmet-api/emmet/api/routes/dois/resources.py @@ -1,5 +1,6 @@ from maggma.api.resource import ReadOnlyResource from emmet.core.dois import DOIDoc +from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery from emmet.api.core.global_header import GlobalHeaderProcessor from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery from emmet.api.core.settings import MAPISettings @@ -10,14 +11,14 @@ def dois_resource(dois_store): dois_store, DOIDoc, query_operators=[ + MultiMaterialIDQuery(), PaginationQuery(), - SparseFieldsQuery(DOIDoc, default_fields=["task_id", "doi"]), + SparseFieldsQuery(DOIDoc, default_fields=["material_id", "doi"]), ], header_processor=GlobalHeaderProcessor(), tags=["DOIs"], - enable_default_search=False, disable_validation=True, - timeout=MAPISettings().TIMEOUT, + timeout=MAPISettings().TIMEOUT, # type: ignore ) return resource diff --git a/emmet-api/emmet/api/routes/materials/charge_density/resources.py b/emmet-api/emmet/api/routes/materials/charge_density/resources.py index a6d7a4f4e7..31d112671e 100644 --- a/emmet-api/emmet/api/routes/materials/charge_density/resources.py +++ b/emmet-api/emmet/api/routes/materials/charge_density/resources.py @@ -20,7 +20,6 @@ def charge_density_resource(s3_store): tags=["Materials Charge Density"], sub_path="/charge_density/", enable_default_search=True, - enable_get_by_key=False, disable_validation=True, query_disk_use=False, ) diff --git a/emmet-api/emmet/api/routes/materials/electronic_structure/resources.py b/emmet-api/emmet/api/routes/materials/electronic_structure/resources.py index 6a32c6052e..bacfe9077c 100644 --- a/emmet-api/emmet/api/routes/materials/electronic_structure/resources.py +++ b/emmet-api/emmet/api/routes/materials/electronic_structure/resources.py @@ -66,7 +66,6 @@ def bs_resource(es_store): ], header_processor=GlobalHeaderProcessor(), tags=["Materials Electronic Structure"], - enable_get_by_key=False, sub_path="/electronic_structure/bandstructure/", disable_validation=True, timeout=timeout, @@ -85,7 +84,6 @@ def bs_obj_resource(s3_store): ], header_processor=GlobalHeaderProcessor(), tags=["Materials Electronic Structure"], - enable_get_by_key=False, enable_default_search=True, sub_path="/electronic_structure/bandstructure/object/", query_disk_use=False, @@ -109,7 +107,6 @@ def dos_resource(es_store): ], header_processor=GlobalHeaderProcessor(), tags=["Materials Electronic Structure"], - enable_get_by_key=False, sub_path="/electronic_structure/dos/", disable_validation=True, timeout=timeout, @@ -128,7 +125,6 @@ def dos_obj_resource(s3_store): ], header_processor=GlobalHeaderProcessor(), tags=["Materials Electronic Structure"], - enable_get_by_key=False, enable_default_search=True, sub_path="/electronic_structure/dos/object/", query_disk_use=False, diff --git a/emmet-api/emmet/api/routes/materials/eos/resources.py b/emmet-api/emmet/api/routes/materials/eos/resources.py index cfc6aeb93f..7a584ba517 100644 --- a/emmet-api/emmet/api/routes/materials/eos/resources.py +++ b/emmet-api/emmet/api/routes/materials/eos/resources.py @@ -1,5 +1,6 @@ from maggma.api.resource import ReadOnlyResource from emmet.core.eos import EOSDoc +from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery from emmet.api.core.global_header import GlobalHeaderProcessor @@ -11,6 +12,7 @@ def eos_resource(eos_store): eos_store, EOSDoc, query_operators=[ + MultiMaterialIDQuery(), PaginationQuery(), SparseFieldsQuery(EOSDoc, default_fields=["task_id"]), ], diff --git a/emmet-api/emmet/api/routes/materials/fermi/resources.py b/emmet-api/emmet/api/routes/materials/fermi/resources.py index de98479b46..c527aadb11 100644 --- a/emmet-api/emmet/api/routes/materials/fermi/resources.py +++ b/emmet-api/emmet/api/routes/materials/fermi/resources.py @@ -1,5 +1,6 @@ from maggma.api.resource import ReadOnlyResource from emmet.core.fermi import FermiDoc +from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery from emmet.api.core.global_header import GlobalHeaderProcessor from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery @@ -9,6 +10,7 @@ def fermi_resource(fermi_store): fermi_store, FermiDoc, query_operators=[ + MultiMaterialIDQuery(), PaginationQuery(), SparseFieldsQuery(FermiDoc, default_fields=["task_id", "last_updated"]), ], diff --git a/emmet-api/emmet/api/routes/materials/grain_boundary/resources.py b/emmet-api/emmet/api/routes/materials/grain_boundary/resources.py index c4d27ad3a0..a6f50ff661 100644 --- a/emmet-api/emmet/api/routes/materials/grain_boundary/resources.py +++ b/emmet-api/emmet/api/routes/materials/grain_boundary/resources.py @@ -5,6 +5,7 @@ GBStructureQuery, GBTaskIDQuery, ) +from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery from maggma.api.query_operator import ( PaginationQuery, SparseFieldsQuery, @@ -19,6 +20,7 @@ def gb_resource(gb_store): gb_store, GrainBoundaryDoc, query_operators=[ + MultiMaterialIDQuery(), GBTaskIDQuery(), NumericQuery( model=GrainBoundaryDoc, excluded_fields=["rotation_axis", "gb_plane"] @@ -31,10 +33,9 @@ def gb_resource(gb_store): ], header_processor=GlobalHeaderProcessor(), tags=["Materials Grain Boundaries"], - sub_path="/grain_boundary/", - enable_get_by_key=False, + sub_path="/grain_boundaries/", disable_validation=True, - timeout=MAPISettings().TIMEOUT, + timeout=MAPISettings().TIMEOUT, # type: ignore ) return resource diff --git a/emmet-api/emmet/api/routes/materials/materials/resources.py b/emmet-api/emmet/api/routes/materials/materials/resources.py index 06c0d5560f..de6c2bcea5 100644 --- a/emmet-api/emmet/api/routes/materials/materials/resources.py +++ b/emmet-api/emmet/api/routes/materials/materials/resources.py @@ -29,7 +29,7 @@ from emmet.api.core.global_header import GlobalHeaderProcessor from emmet.api.core.settings import MAPISettings -timeout = MAPISettings().TIMEOUT +timeout = MAPISettings().TIMEOUT # type: ignore def find_structure_resource(materials_store): @@ -90,9 +90,8 @@ def blessed_tasks_resource(materials_store): header_processor=GlobalHeaderProcessor(), tags=["Materials"], sub_path="/core/blessed_tasks/", - enable_get_by_key=False, disable_validation=True, - timeout=MAPISettings().TIMEOUT, + timeout=MAPISettings().TIMEOUT, # type: ignore ) return resource @@ -122,7 +121,7 @@ def materials_resource(materials_store): tags=["Materials"], sub_path="/core/", disable_validation=True, - timeout=MAPISettings().TIMEOUT, + timeout=MAPISettings().TIMEOUT, # type: ignore ) return resource diff --git a/emmet-api/emmet/api/routes/materials/phonon/resources.py b/emmet-api/emmet/api/routes/materials/phonon/resources.py index 149b8e05d1..79d9d79949 100644 --- a/emmet-api/emmet/api/routes/materials/phonon/resources.py +++ b/emmet-api/emmet/api/routes/materials/phonon/resources.py @@ -2,6 +2,7 @@ from maggma.api.resource import ReadOnlyResource from emmet.core.phonon import PhononBSDOSDoc +from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery from emmet.api.core.global_header import GlobalHeaderProcessor from emmet.api.core.settings import MAPISettings @@ -11,17 +12,17 @@ def phonon_bsdos_resource(phonon_bs_store): phonon_bs_store, PhononBSDOSDoc, query_operators=[ + MultiMaterialIDQuery(), PaginationQuery(), SparseFieldsQuery( - PhononBSDOSDoc, default_fields=["task_id", "last_updated"] + PhononBSDOSDoc, default_fields=["material_id", "last_updated"] ), ], header_processor=GlobalHeaderProcessor(), tags=["Materials Phonon"], sub_path="/phonon/", - enable_default_search=False, disable_validation=True, - timeout=MAPISettings().TIMEOUT, + timeout=MAPISettings().TIMEOUT, # type: ignore ) return resource diff --git a/emmet-api/emmet/api/routes/materials/robocrys/resources.py b/emmet-api/emmet/api/routes/materials/robocrys/resources.py index 828fc2c3c7..8f0afb75f4 100644 --- a/emmet-api/emmet/api/routes/materials/robocrys/resources.py +++ b/emmet-api/emmet/api/routes/materials/robocrys/resources.py @@ -37,9 +37,9 @@ def robo_search_resource(robo_store): robo_store, RobocrystallogapherDoc, pipeline_query_operator=RoboTextSearchQuery(), - tags=["Robocrystallographer"], sub_path="/robocrys/text_search/", header_processor=GlobalHeaderProcessor(), + tags=["Materials Robocrystallographer"], timeout=timeout, ) diff --git a/emmet-api/emmet/api/routes/materials/similarity/resources.py b/emmet-api/emmet/api/routes/materials/similarity/resources.py index c0a4ad4161..cfb9184481 100644 --- a/emmet-api/emmet/api/routes/materials/similarity/resources.py +++ b/emmet-api/emmet/api/routes/materials/similarity/resources.py @@ -2,6 +2,7 @@ from maggma.api.resource import ReadOnlyResource from emmet.api.core.global_header import GlobalHeaderProcessor from emmet.api.core.settings import MAPISettings +from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery from emmet.core.similarity import SimilarityDoc @@ -11,15 +12,15 @@ def similarity_resource(similarity_store): similarity_store, SimilarityDoc, query_operators=[ + MultiMaterialIDQuery(), PaginationQuery(), SparseFieldsQuery(SimilarityDoc, default_fields=["material_id"]), ], header_processor=GlobalHeaderProcessor(), tags=["Materials Similarity"], sub_path="/similarity/", - enable_default_search=False, disable_validation=True, - timeout=MAPISettings().TIMEOUT, + timeout=MAPISettings().TIMEOUT, # type: ignore ) return resource diff --git a/emmet-api/emmet/api/routes/materials/substrates/resources.py b/emmet-api/emmet/api/routes/materials/substrates/resources.py index 856cc6c47a..16896f1343 100644 --- a/emmet-api/emmet/api/routes/materials/substrates/resources.py +++ b/emmet-api/emmet/api/routes/materials/substrates/resources.py @@ -30,7 +30,6 @@ def substrates_resource(substrates_store): header_processor=GlobalHeaderProcessor(), tags=["Materials Substrates"], sub_path="/substrates/", - enable_get_by_key=False, disable_validation=True, timeout=MAPISettings().TIMEOUT, ) diff --git a/emmet-api/emmet/api/routes/materials/surface_properties/resources.py b/emmet-api/emmet/api/routes/materials/surface_properties/resources.py index 92f57ef6bd..997081f328 100644 --- a/emmet-api/emmet/api/routes/materials/surface_properties/resources.py +++ b/emmet-api/emmet/api/routes/materials/surface_properties/resources.py @@ -4,6 +4,7 @@ from emmet.api.core.settings import MAPISettings from emmet.api.core.global_header import GlobalHeaderProcessor +from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery from emmet.api.routes.materials.surface_properties.query_operators import ( ReconstructedQuery, ) @@ -15,6 +16,7 @@ def surface_props_resource(surface_prop_store): surface_prop_store, SurfacePropDoc, query_operators=[ + MultiMaterialIDQuery(), NumericQuery(model=SurfacePropDoc), ReconstructedQuery(), PaginationQuery(), @@ -24,7 +26,7 @@ def surface_props_resource(surface_prop_store): tags=["Materials Surface Properties"], sub_path="/surface_properties/", disable_validation=True, - timeout=MAPISettings().TIMEOUT, + timeout=MAPISettings().TIMEOUT, # type: ignore ) return resource diff --git a/emmet-api/emmet/api/routes/materials/tasks/resources.py b/emmet-api/emmet/api/routes/materials/tasks/resources.py index ab90b426f2..b997d6a5ef 100644 --- a/emmet-api/emmet/api/routes/materials/tasks/resources.py +++ b/emmet-api/emmet/api/routes/materials/tasks/resources.py @@ -54,7 +54,6 @@ def task_deprecation_resource(materials_store): DeprecationDoc, query_operators=[DeprecationQuery(), PaginationQuery()], tags=["Materials Tasks"], - enable_get_by_key=False, enable_default_search=True, sub_path="/tasks/deprecation/", header_processor=GlobalHeaderProcessor(), diff --git a/emmet-api/emmet/api/routes/materials/thermo/query_operators.py b/emmet-api/emmet/api/routes/materials/thermo/query_operators.py index 24a3a21ab4..ea05c2ce49 100644 --- a/emmet-api/emmet/api/routes/materials/thermo/query_operators.py +++ b/emmet-api/emmet/api/routes/materials/thermo/query_operators.py @@ -75,3 +75,31 @@ def query( crit.update({"thermo_type": {"$in": thermo_type_list}}) return {"criteria": crit} + + +class MultiPhaseDiagramIDQuery(QueryOperator): + """ + Method to generate a query for different root-level phase_diagram_id values + """ + + def query( + self, + phase_diagram_ids: Optional[str] = Query( + None, + description="Comma-separated list of phase_diagram_id values to query on", + ), + ) -> STORE_PARAMS: + crit = {} # type: dict + + if phase_diagram_ids: + phase_diagram_id_list = [ + phase_diagram_id.strip() + for phase_diagram_id in phase_diagram_ids.split(",") + ] + + if len(phase_diagram_id_list) == 1: + crit.update({"phase_diagram_id": phase_diagram_id_list[0]}) + else: + crit.update({"phase_diagram_id": {"$in": phase_diagram_id_list}}) + + return {"criteria": crit} diff --git a/emmet-api/emmet/api/routes/materials/thermo/resources.py b/emmet-api/emmet/api/routes/materials/thermo/resources.py index 676c71f6ca..e714153539 100644 --- a/emmet-api/emmet/api/routes/materials/thermo/resources.py +++ b/emmet-api/emmet/api/routes/materials/thermo/resources.py @@ -11,6 +11,7 @@ IsStableQuery, MultiThermoIDQuery, MultiThermoTypeQuery, + MultiPhaseDiagramIDQuery, ) from emmet.api.core.global_header import GlobalHeaderProcessor from emmet.api.routes.materials.materials.query_operators import ( @@ -26,10 +27,16 @@ def phase_diagram_resource(phase_diagram_store): resource = ReadOnlyResource( phase_diagram_store, PhaseDiagramDoc, + query_operators=[ + MultiPhaseDiagramIDQuery(), + SparseFieldsQuery( + ThermoDoc, + default_fields=["phase_diagram_id"], + ), + ], tags=["Materials Thermo"], sub_path="/thermo/phase_diagram/", disable_validation=True, - enable_default_search=False, header_processor=GlobalHeaderProcessor(), query_disk_use=False, ) diff --git a/emmet-api/emmet/api/routes/materials/xas/query_operators.py b/emmet-api/emmet/api/routes/materials/xas/query_operators.py index 2e94388ab0..ddd394c079 100644 --- a/emmet-api/emmet/api/routes/materials/xas/query_operators.py +++ b/emmet-api/emmet/api/routes/materials/xas/query_operators.py @@ -30,26 +30,26 @@ def ensure_indexes(self): # pragma: no cover return [(key, False) for key in keys] -class XASTaskIDQuery(QueryOperator): +class XASIDQuery(QueryOperator): """ - Method to generate a query for XAS data given a list of task_ids + Method to generate a query for XAS data given a list of spectrum_ids """ def query( self, - material_ids: Optional[str] = Query( - None, description="Comma-separated list of material_id to query on" + spectrum_ids: Optional[str] = Query( + None, description="Comma-separated list of spectrum_id to query on" ), ) -> STORE_PARAMS: crit = {} - if material_ids: + if spectrum_ids: crit.update( { - "material_id": { + "spectrum_id": { "$in": [ - material_id.strip() - for material_id in material_ids.split(",") + spectrum_id.strip() + for spectrum_id in spectrum_ids.split(",") ] } } diff --git a/emmet-api/emmet/api/routes/materials/xas/resources.py b/emmet-api/emmet/api/routes/materials/xas/resources.py index 49a2e75d81..811946dcdd 100644 --- a/emmet-api/emmet/api/routes/materials/xas/resources.py +++ b/emmet-api/emmet/api/routes/materials/xas/resources.py @@ -2,13 +2,14 @@ from emmet.core.xas import XASDoc from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery +from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery from emmet.api.routes.materials.materials.query_operators import ( ElementsQuery, FormulaQuery, ChemsysQuery, ) from emmet.api.core.global_header import GlobalHeaderProcessor -from emmet.api.routes.materials.xas.query_operators import XASQuery, XASTaskIDQuery +from emmet.api.routes.materials.xas.query_operators import XASQuery, XASIDQuery from emmet.api.core.settings import MAPISettings @@ -17,11 +18,12 @@ def xas_resource(xas_store): xas_store, XASDoc, query_operators=[ + MultiMaterialIDQuery(), FormulaQuery(), ChemsysQuery(), ElementsQuery(), XASQuery(), - XASTaskIDQuery(), + XASIDQuery(), PaginationQuery(), SparseFieldsQuery( XASDoc, @@ -40,7 +42,7 @@ def xas_resource(xas_store): tags=["Materials XAS"], sub_path="/xas/", disable_validation=True, - timeout=MAPISettings().TIMEOUT, + timeout=MAPISettings().TIMEOUT, # type: ignore ) return resource diff --git a/emmet-api/emmet/api/routes/molecules/tasks/resources.py b/emmet-api/emmet/api/routes/molecules/tasks/resources.py index 48e794c5d9..a65757232d 100644 --- a/emmet-api/emmet/api/routes/molecules/tasks/resources.py +++ b/emmet-api/emmet/api/routes/molecules/tasks/resources.py @@ -53,7 +53,6 @@ def task_deprecation_resource(task_store): DeprecationDoc, query_operators=[DeprecationQuery(), PaginationQuery()], tags=["Molecules Tasks"], - enable_get_by_key=False, enable_default_search=True, sub_path="/tasks/deprecation/", header_processor=GlobalHeaderProcessor(), diff --git a/emmet-api/material_resources.py b/emmet-api/material_resources.py index a0a7e39eee..073dfa499e 100644 --- a/emmet-api/material_resources.py +++ b/emmet-api/material_resources.py @@ -6,7 +6,7 @@ resources = {} -default_settings = MAPISettings() +default_settings = MAPISettings() # type: ignore db_uri = os.environ.get("MPCONTRIBS_MONGO_HOST", None) db_version = default_settings.DB_VERSION @@ -136,7 +136,7 @@ ) doi_store = MongoURIStore( - uri=db_uri, database="mp_core", key="task_id", collection_name="dois" + uri=db_uri, database="mp_core", key="material_id", collection_name="dois" ) substrates_store = MongoURIStore( diff --git a/emmet-api/tests/materials/xas/test_query_operators.py b/emmet-api/tests/materials/xas/test_query_operators.py index 50bff07f2a..f2300960bb 100644 --- a/emmet-api/tests/materials/xas/test_query_operators.py +++ b/emmet-api/tests/materials/xas/test_query_operators.py @@ -1,4 +1,4 @@ -from emmet.api.routes.materials.xas.query_operators import XASQuery, XASTaskIDQuery +from emmet.api.routes.materials.xas.query_operators import XASQuery, XASIDQuery from monty.tempfile import ScratchDir from monty.serialization import loadfn, dumpfn @@ -32,16 +32,20 @@ def test_xas_operator(): def test_xas_task_id_operator(): - op = XASTaskIDQuery() + op = XASIDQuery() - assert op.query(material_ids="mp-149, mp-13") == { - "criteria": {"material_id": {"$in": ["mp-149", "mp-13"]}} + assert op.query(spectrum_ids="mp-149-XANES-Pd-K, mp-8951-XANES-Pd-K") == { + "criteria": { + "spectrum_id": {"$in": ["mp-149-XANES-Pd-K", "mp-8951-XANES-Pd-K"]} + } } with ScratchDir("."): dumpfn(op, "temp.json") new_op = loadfn("temp.json") - assert new_op.query(material_ids="mp-149, mp-13") == { - "criteria": {"material_id": {"$in": ["mp-149", "mp-13"]}} + assert new_op.query(spectrum_ids="mp-149-XANES-Pd-K, mp-8951-XANES-Pd-K") == { + "criteria": { + "spectrum_id": {"$in": ["mp-149-XANES-Pd-K", "mp-8951-XANES-Pd-K"]} + } } diff --git a/emmet-builders/tests/test_basic_descriptors.py b/emmet-builders/tests/test_basic_descriptors.py index 486beafd1a..b5bd65f2bd 100644 --- a/emmet-builders/tests/test_basic_descriptors.py +++ b/emmet-builders/tests/test_basic_descriptors.py @@ -1,7 +1,7 @@ import pytest from maggma.stores import JSONStore, MemoryStore -from emmet.builders.materials.basic_descriptors import BasicDescriptorsBuilder +# from emmet.builders.materials.basic_descriptors import BasicDescriptorsBuilder from emmet.builders.vasp.materials import MaterialsBuilder @@ -18,12 +18,13 @@ def materials_store(tasks_store): return materials_store -def test_basic_descriptions(materials_store): - descriptors_store = MemoryStore() - builder = BasicDescriptorsBuilder( - materials=materials_store, descriptors=descriptors_store - ) - builder.run() - - print(descriptors_store.query_one({})) - assert descriptors_store.count() == 1 +# @pytest.mark.skip(reason="Waiting on matminer update") +# def test_basic_descriptions(materials_store): +# descriptors_store = MemoryStore() +# builder = BasicDescriptorsBuilder( +# materials=materials_store, descriptors=descriptors_store +# ) +# builder.run() +# +# print(descriptors_store.query_one({})) +# assert descriptors_store.count() == 1 diff --git a/emmet-builders/tests/test_similarity.py b/emmet-builders/tests/test_similarity.py index cf09b3ca3e..3e3a90a3ff 100644 --- a/emmet-builders/tests/test_similarity.py +++ b/emmet-builders/tests/test_similarity.py @@ -1,7 +1,7 @@ import pytest from maggma.stores import JSONStore, MemoryStore -from emmet.builders.materials.basic_descriptors import BasicDescriptorsBuilder +# from emmet.builders.materials.basic_descriptors import BasicDescriptorsBuilder from emmet.builders.vasp.materials import MaterialsBuilder from emmet.builders.materials.similarity import StructureSimilarityBuilder @@ -21,16 +21,17 @@ def materials_store(tasks_store): return materials_store -@pytest.fixture(scope="session") -def descriptors_store(materials_store): - descriptors_store = MemoryStore(key="task_id") - builder = BasicDescriptorsBuilder( - materials=materials_store, descriptors=descriptors_store - ) - builder.run() - return descriptors_store +# @pytest.fixture(scope="session") +# def descriptors_store(materials_store): +# descriptors_store = MemoryStore(key="task_id") +# builder = BasicDescriptorsBuilder( +# materials=materials_store, descriptors=descriptors_store +# ) +# builder.run() +# return descriptors_store +@pytest.mark.skip(reason="Waiting on matminer update") def test_basic_descriptions(descriptors_store): similarity_store = MemoryStore() builder = StructureSimilarityBuilder( diff --git a/emmet-core/emmet/core/dois.py b/emmet-core/emmet/core/dois.py index 3bb06d4e35..9ed9eab3d9 100644 --- a/emmet-core/emmet/core/dois.py +++ b/emmet-core/emmet/core/dois.py @@ -17,7 +17,7 @@ class DOIDoc(BaseModel): description="Bibtex reference of the material.", ) - task_id: Optional[str] = Field( + material_id: Optional[str] = Field( None, description="The Materials Project ID of the material. This comes in the form: mp-******.", ) diff --git a/emmet-core/emmet/core/eos.py b/emmet-core/emmet/core/eos.py index b084b452f8..84f04a67af 100644 --- a/emmet-core/emmet/core/eos.py +++ b/emmet-core/emmet/core/eos.py @@ -23,7 +23,7 @@ class EOSDoc(BaseModel): description="Data for each type of equation of state.", ) - task_id: Optional[str] = Field( + material_id: Optional[str] = Field( None, description="The Materials Project ID of the material. This comes in the form: mp-******.", ) diff --git a/emmet-core/emmet/core/fermi.py b/emmet-core/emmet/core/fermi.py index 80ae606c14..f2f23898d3 100644 --- a/emmet-core/emmet/core/fermi.py +++ b/emmet-core/emmet/core/fermi.py @@ -22,7 +22,7 @@ class FermiDoc(BaseModel): Is either CBM or VBM for semiconductors, or fermi_surface for metals.", ) - task_id: Optional[str] = Field( + material_id: Optional[str] = Field( None, description="The Materials Project ID of the material. This comes in the form: mp-******.", ) diff --git a/emmet-core/emmet/core/grain_boundary.py b/emmet-core/emmet/core/grain_boundary.py index ada3c643d4..75013b8c0c 100644 --- a/emmet-core/emmet/core/grain_boundary.py +++ b/emmet-core/emmet/core/grain_boundary.py @@ -21,7 +21,7 @@ class GrainBoundaryDoc(BaseModel): Grain boundary energies, work of separation... """ - task_id: Optional[str] = Field( + material_id: Optional[str] = Field( None, description="The Materials Project ID of the material. This comes in the form: mp-******.", ) diff --git a/emmet-core/emmet/core/surface_properties.py b/emmet-core/emmet/core/surface_properties.py index fcee35d53e..d419633d0c 100644 --- a/emmet-core/emmet/core/surface_properties.py +++ b/emmet-core/emmet/core/surface_properties.py @@ -100,7 +100,7 @@ class SurfacePropDoc(BaseModel): description="Whether the entry has any reconstructed surfaces.", ) - task_id: Optional[str] = Field( + material_id: Optional[str] = Field( None, description="The Materials Project ID of the material. This comes in the form: mp-******.", )