Skip to content

Commit

Permalink
Add sorting to messages api endpoint (#774)
Browse files Browse the repository at this point in the history
* Add sorting to messages api endpoint

* Bump maggma
  • Loading branch information
munrojm committed Jul 7, 2023
1 parent 4ebb0d6 commit d1c0a90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion emmet-api/emmet/api/routes/_messages/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
MessagesPostQuery,
MessagesGetQuery,
)
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery, SortQuery
from emmet.core._messages import MessagesDoc


Expand All @@ -15,6 +15,7 @@ def messages_resource(messages_store):
get_query_operators=[
MessagesGetQuery(),
PaginationQuery(),
SortQuery(),
SparseFieldsQuery(
model=MessagesDoc, default_fields=["title", "body", "last_updated"]
),
Expand Down
2 changes: 1 addition & 1 deletion emmet-builders/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
author_email="feedback@materialsproject.org",
url="https://github.com/materialsproject/emmet",
packages=find_namespace_packages(include=["emmet.*"]),
install_requires=["emmet-core[all]", "maggma>=0.51.9", "matminer>=0.7.3"],
install_requires=["emmet-core[all]", "maggma>=0.51.16", "matminer>=0.7.3"],
extras_require={
"test": [
"pre-commit",
Expand Down

0 comments on commit d1c0a90

Please sign in to comment.