Skip to content

Commit

Permalink
Remove all sort parameters (#902)
Browse files Browse the repository at this point in the history
* Remove all sort parameters

* Linting
  • Loading branch information
Jason Munro authored Nov 21, 2023
1 parent a1f4d16 commit 6322d74
Show file tree
Hide file tree
Showing 34 changed files with 21 additions and 71 deletions.
3 changes: 1 addition & 2 deletions emmet-api/emmet/api/routes/legacy/jcesr/resources.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from maggma.api.resource import ReadOnlyResource
from emmet.core.molecules_jcesr import MoleculesDoc

from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from emmet.api.routes.legacy.jcesr.query_operators import (
MoleculeBaseQuery,
MoleculeElementsQuery,
Expand All @@ -21,7 +21,6 @@ def jcesr_resource(molecules_store):
MoleculeElementsQuery(),
MoleculeFormulaQuery(),
MultipleTaskIDsQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(MoleculesDoc, default_fields=["task_id"]),
],
Expand Down
2 changes: 0 additions & 2 deletions emmet-api/emmet/api/routes/materials/absorption/resources.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from maggma.api.query_operator import (
PaginationQuery,
SortQuery,
SparseFieldsQuery,
NumericQuery,
)
Expand Down Expand Up @@ -29,7 +28,6 @@ def absorption_resource(absorption_store):
"energy_max",
],
),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
AbsorptionDoc,
Expand Down
3 changes: 1 addition & 2 deletions emmet-api/emmet/api/routes/materials/alloys/resources.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from maggma.api.resource import ReadOnlyResource

from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery

from emmet.core.alloys import AlloyPairDoc

Expand All @@ -18,7 +18,6 @@ def alloy_pairs_resource(alloy_pairs_store):
query_operators=[
MaterialIDsSearchQuery(),
FormulaSearchQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
AlloyPairDoc,
Expand Down
3 changes: 1 addition & 2 deletions emmet-api/emmet/api/routes/materials/bonds/resources.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from maggma.api.resource import ReadOnlyResource
from emmet.core.bonds import BondingDoc

from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery

from emmet.api.routes.materials.bonds.query_operators import (
BondLengthQuery,
Expand All @@ -20,7 +20,6 @@ def bonds_resource(bonds_store):
MultiMaterialIDQuery(),
BondLengthQuery(),
CoordinationEnvsQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
BondingDoc,
Expand Down
2 changes: 0 additions & 2 deletions emmet-api/emmet/api/routes/materials/chemenv/resources.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from maggma.api.query_operator import (
PaginationQuery,
SortQuery,
SparseFieldsQuery,
NumericQuery,
)
Expand All @@ -25,7 +24,6 @@ def chemenv_resource(chemenv_store):
ChemEnvQuery(),
ElementsQuery(),
NumericQuery(model=ChemEnvDoc, excluded_fields=["valences"]),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
ChemEnvDoc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from emmet.core.electrode import ConversionElectrodeDoc
from emmet.api.core.global_header import GlobalHeaderProcessor

from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from emmet.api.routes.materials.insertion_electrodes.query_operators import (
ElectrodeFormulaQuery,
ElectrodeElementsQuery,
Expand All @@ -28,7 +28,6 @@ def conversion_electrodes_resource(conversion_electrodes_store):
WorkingIonQuery(),
ElectrodeElementsQuery(),
NumericQuery(model=ConversionElectrodeDoc),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
ConversionElectrodeDoc,
Expand Down
3 changes: 1 addition & 2 deletions emmet-api/emmet/api/routes/materials/dielectric/resources.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from maggma.api.resource import ReadOnlyResource
from emmet.core.polar import DielectricDoc

from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from emmet.api.routes.materials.dielectric.query_operators import DielectricQuery
from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery
from emmet.api.core.global_header import GlobalHeaderProcessor
Expand All @@ -15,7 +15,6 @@ def dielectric_resource(dielectric_store):
query_operators=[
MultiMaterialIDQuery(),
DielectricQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
DielectricDoc, default_fields=["material_id", "last_updated"]
Expand Down
3 changes: 1 addition & 2 deletions emmet-api/emmet/api/routes/materials/elasticity/resources.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from maggma.api.resource import ReadOnlyResource
from emmet.core.elasticity import ElasticityDoc
from emmet.api.core.global_header import GlobalHeaderProcessor
from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery
from emmet.api.routes.materials.elasticity.query_operators import (
ElasticityChemsysQuery,
Expand All @@ -23,7 +23,6 @@ def elasticity_resource(elasticity_store):
BulkModulusQuery(),
ShearModulusQuery(),
PoissonQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
ElasticityDoc,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from maggma.api.query_operator.dynamic import NumericQuery
from maggma.api.resource import ReadOnlyResource
from emmet.core.electronic_structure import ElectronicStructureDoc
from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery

from emmet.api.routes.materials.materials.query_operators import (
ElementsQuery,
Expand Down Expand Up @@ -36,7 +36,6 @@ def es_resource(es_store):
ElementsQuery(),
NumericQuery(model=ElectronicStructureDoc),
DeprecationQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
ElectronicStructureDoc, default_fields=["material_id", "last_updated"]
Expand All @@ -59,7 +58,6 @@ def bs_resource(es_store):
query_operators=[
BSDataQuery(),
DeprecationQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
ElectronicStructureDoc,
Expand Down Expand Up @@ -103,7 +101,6 @@ def dos_resource(es_store):
query_operators=[
DOSDataQuery(),
DeprecationQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
ElectronicStructureDoc,
Expand Down
3 changes: 1 addition & 2 deletions emmet-api/emmet/api/routes/materials/eos/resources.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from maggma.api.resource import ReadOnlyResource
from emmet.core.eos import EOSDoc

from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from emmet.api.core.global_header import GlobalHeaderProcessor
from emmet.api.core.settings import MAPISettings

Expand All @@ -11,7 +11,6 @@ def eos_resource(eos_store):
eos_store,
EOSDoc,
query_operators=[
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(EOSDoc, default_fields=["task_id"]),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
)
from maggma.api.query_operator import (
PaginationQuery,
SortQuery,
SparseFieldsQuery,
NumericQuery,
)
Expand All @@ -25,7 +24,6 @@ def gb_resource(gb_store):
model=GrainBoundaryDoc, excluded_fields=["rotation_axis", "gb_plane"]
),
GBStructureQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
GrainBoundaryDoc, default_fields=["task_id", "last_updated"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from emmet.core.electrode import InsertionElectrodeDoc
from emmet.api.core.global_header import GlobalHeaderProcessor

from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from emmet.api.routes.materials.insertion_electrodes.query_operators import (
ElectrodeFormulaQuery,
ElectrodeElementsQuery,
Expand All @@ -28,7 +28,6 @@ def insertion_electrodes_resource(insertion_electrodes_store):
WorkingIonQuery(),
ElectrodeElementsQuery(),
NumericQuery(model=InsertionElectrodeDoc),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
InsertionElectrodeDoc,
Expand Down
3 changes: 1 addition & 2 deletions emmet-api/emmet/api/routes/materials/magnetism/resources.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from maggma.api.resource import ReadOnlyResource
from emmet.core.magnetism import MagnetismDoc

from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from emmet.api.routes.materials.magnetism.query_operators import MagneticQuery
from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery
from emmet.api.core.global_header import GlobalHeaderProcessor
Expand All @@ -15,7 +15,6 @@ def magnetism_resource(magnetism_store):
query_operators=[
MultiMaterialIDQuery(),
MagneticQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
MagnetismDoc, default_fields=["material_id", "last_updated"]
Expand Down
3 changes: 0 additions & 3 deletions emmet-api/emmet/api/routes/materials/materials/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from maggma.api.query_operator import (
PaginationQuery,
SparseFieldsQuery,
SortQuery,
NumericQuery,
)

Expand Down Expand Up @@ -74,7 +73,6 @@ def blessed_tasks_resource(materials_store):
MultiTaskIDQuery(),
DeprecationQuery(),
NumericQuery(model=MaterialsDoc),
SortQuery(),
PaginationQuery(),
LicenseQuery(),
],
Expand Down Expand Up @@ -109,7 +107,6 @@ def materials_resource(materials_store):
SymmetryQuery(),
DeprecationQuery(),
NumericQuery(model=MaterialsDoc),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
MaterialsDoc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from maggma.api.query_operator import (
PaginationQuery,
SortQuery,
SparseFieldsQuery,
)

Expand All @@ -29,7 +28,6 @@ def oxi_states_resource(oxi_states_store):
FormulaQuery(),
ChemsysQuery(),
PossibleOxiStateQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
OxidationStateDoc, default_fields=["material_id", "last_updated"]
Expand Down
3 changes: 1 addition & 2 deletions emmet-api/emmet/api/routes/materials/piezo/resources.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from maggma.api.resource import ReadOnlyResource
from emmet.core.polar import PiezoelectricDoc

from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from emmet.api.routes.materials.piezo.query_operators import PiezoelectricQuery
from emmet.api.routes.materials.materials.query_operators import MultiMaterialIDQuery
from emmet.api.core.global_header import GlobalHeaderProcessor
Expand All @@ -15,7 +15,6 @@ def piezo_resource(piezo_store):
query_operators=[
MultiMaterialIDQuery(),
PiezoelectricQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
PiezoelectricDoc, default_fields=["material_id", "last_updated"]
Expand Down
2 changes: 0 additions & 2 deletions emmet-api/emmet/api/routes/materials/substrates/resources.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from maggma.api.query_operator import (
NumericQuery,
PaginationQuery,
SortQuery,
SparseFieldsQuery,
StringQueryOperator,
)
Expand All @@ -25,7 +24,6 @@ def substrates_resource(substrates_store):
StringQueryOperator(
model=SubstratesDoc, excluded_fields=["film_orient", "orient"]
),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(SubstratesDoc, default_fields=["film_id", "sub_id"]),
],
Expand Down
2 changes: 0 additions & 2 deletions emmet-api/emmet/api/routes/materials/summary/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from maggma.api.query_operator import (
PaginationQuery,
SortQuery,
SparseFieldsQuery,
NumericQuery,
)
Expand Down Expand Up @@ -62,7 +61,6 @@ def summary_resource(summary_store):
SearchHasReconstructedQuery(),
HasPropsQuery(),
DeprecationQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(SummaryDoc, default_fields=["material_id"]),
LicenseQuery(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from maggma.api.query_operator.dynamic import NumericQuery
from maggma.api.resource import ReadOnlyResource
from emmet.api.core.settings import MAPISettings
Expand All @@ -17,7 +17,6 @@ def surface_props_resource(surface_prop_store):
query_operators=[
NumericQuery(model=SurfacePropDoc),
ReconstructedQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(SurfacePropDoc, default_fields=["task_id"]),
],
Expand Down
3 changes: 1 addition & 2 deletions emmet-api/emmet/api/routes/materials/tasks/resources.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from maggma.api.resource import ReadOnlyResource

from emmet.api.routes.materials.materials.query_operators import (
Expand Down Expand Up @@ -29,7 +29,6 @@ def task_resource(task_store):
ChemsysQuery(),
ElementsQuery(),
MultipleTaskIDsQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
TaskDoc,
Expand Down
2 changes: 0 additions & 2 deletions emmet-api/emmet/api/routes/materials/thermo/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from maggma.api.query_operator import (
PaginationQuery,
SortQuery,
SparseFieldsQuery,
)
from emmet.api.routes.materials.thermo.query_operators import (
Expand Down Expand Up @@ -50,7 +49,6 @@ def thermo_resource(thermo_store):
ChemsysQuery(),
IsStableQuery(),
NumericQuery(model=ThermoDoc),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
ThermoDoc, default_fields=["thermo_id", "material_id", "last_updated"]
Expand Down
3 changes: 1 addition & 2 deletions emmet-api/emmet/api/routes/materials/xas/resources.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from maggma.api.resource import ReadOnlyResource
from emmet.core.xas import XASDoc

from maggma.api.query_operator import PaginationQuery, SortQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from emmet.api.routes.materials.materials.query_operators import (
ElementsQuery,
FormulaQuery,
Expand All @@ -22,7 +22,6 @@ def xas_resource(xas_store):
ElementsQuery(),
XASQuery(),
XASTaskIDQuery(),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
XASDoc,
Expand Down
2 changes: 0 additions & 2 deletions emmet-api/emmet/api/routes/molecules/association/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from maggma.api.query_operator import (
PaginationQuery,
SparseFieldsQuery,
SortQuery,
NumericQuery,
)

Expand Down Expand Up @@ -60,7 +59,6 @@ def mol_assoc_resource(assoc_store):
HashQuery(),
DeprecationQuery(),
NumericQuery(model=MoleculeDoc),
SortQuery(),
PaginationQuery(),
SparseFieldsQuery(
MoleculeDoc,
Expand Down
Loading

0 comments on commit 6322d74

Please sign in to comment.