Skip to content

Commit 780dfc9

Browse files
committed
base phonon search returns base phonon task, not model with objects
1 parent 5a24729 commit 780dfc9

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

mp_api/client/routes/materials/phonon.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from collections import defaultdict
55
from typing import TYPE_CHECKING
66

7-
from emmet.core.phonon import PhononBS, PhononBSDOSDoc, PhononDOS
7+
from emmet.core.phonon import PhononBS, PhononBSDOSDoc, PhononBSDOSTask, PhononDOS
88

99
from mp_api.client.core import BaseRester, MPRestError, MPRestWarning
1010
from mp_api.client.core.utils import validate_ids
@@ -17,7 +17,7 @@
1717

1818
class PhononRester(BaseRester):
1919
suffix = "materials/phonon"
20-
document_model = PhononBSDOSDoc # type: ignore
20+
document_model = PhononBSDOSTask # type: ignore
2121
primary_key = "identifier"
2222

2323
def search(
@@ -29,7 +29,7 @@ def search(
2929
all_fields: bool = True,
3030
fields: list[str] | None = None,
3131
**kwargs,
32-
) -> list[PhononBSDOSDoc] | list[dict]:
32+
) -> list[PhononBSDOSTask] | list[dict]:
3333
"""Query phonon docs using a variety of search criteria.
3434
3535
Arguments:
@@ -39,12 +39,12 @@ def search(
3939
num_chunks (int): Maximum number of chunks of data to yield. None will yield all possible.
4040
chunk_size (int): Number of data entries per chunk.
4141
all_fields (bool): Whether to return all fields in the document. Defaults to True.
42-
fields (List[str]): List of fields in PhononBSDOSDoc to return data for.
43-
Default is material_id, last_updated, and formula_pretty if all_fields is False.
42+
fields (List[str]): List of fields in PhononBSDOSTask to return data for.
43+
Default is identifier, last_updated, and formula_pretty if all_fields is False.
4444
**kwargs : used for handling deprecated kwargs
4545
4646
Returns:
47-
([PhononBSDOSDoc], [dict]) List of phonon documents or dictionaries.
47+
([PhononBSDOSTask], [dict]) List of phonon documents or dictionaries.
4848
"""
4949
query_params: dict = defaultdict(dict)
5050

0 commit comments

Comments
 (0)