Skip to content

Commit

Permalink
Enable direct response on appropriate endpoints (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Munro authored Jul 6, 2021
1 parent 937704b commit f71294c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pydantic==1.8.2
pymatgen==2022.0.10
typing-extensions==3.10.0.0
maggma==0.29.4
maggma==0.30.0
requests==2.25.1
monty==2021.6.10
emmet-core==0.5.0
Expand Down
5 changes: 4 additions & 1 deletion src/mp_api/routes/charge_density/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ def charge_density_resource(s3_store):
query_operators=[
ChgcarTaskIDQuery(),
PaginationQuery(default_limit=5, max_limit=10),
SparseFieldsQuery(ChgcarDataDoc, default_fields=["task_id", "last_updated"],),
SparseFieldsQuery(
ChgcarDataDoc, default_fields=["task_id", "last_updated"],
),
],
tags=["Charge Density"],
enable_default_search=True,
enable_get_by_key=False,
monty_encoded_response=True,
)

return resource
1 change: 1 addition & 0 deletions src/mp_api/routes/electrodes/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def insertion_electrodes_resource(insertion_electrodes_store):
),
],
tags=["Electrodes"],
monty_encoded_response=True,
)

return resource
2 changes: 2 additions & 0 deletions src/mp_api/routes/electronic_structure/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def bs_obj_resource(s3_store):
enable_get_by_key=False,
enable_default_search=True,
sub_path="/bandstructure/object/",
monty_encoded_response=True,
)
return resource

Expand Down Expand Up @@ -108,5 +109,6 @@ def dos_obj_resource(s3_store):
enable_get_by_key=False,
enable_default_search=True,
sub_path="/dos/object/",
monty_encoded_response=True,
)
return resource

0 comments on commit f71294c

Please sign in to comment.