Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions mp_api/client/routes/materials/electrodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class ElectrodeRester(BaseRester[InsertionElectrodeDoc]):

def search( # pragma: ignore
self,
material_ids: str | list[str] | None = None,
battery_ids: str | list[str] | None = None,
average_voltage: tuple[float, float] | None = None,
capacity_grav: tuple[float, float] | None = None,
Expand All @@ -43,8 +42,6 @@ def search( # pragma: ignore
"""Query using a variety of search criteria.

Arguments:
material_ids (str, List[str]): A single Material ID string or list of strings
(e.g., mp-149, [mp-149, mp-13]).
battery_ids (str, List[str]): A single battery ID string or list of strings
(e.g., mp-22526_Li, [mp-22526_Li, mp-22526_Ca]).
average_voltage (Tuple[float,float]): Minimum and maximum value of the average voltage for a particular
Expand Down Expand Up @@ -85,12 +82,6 @@ def search( # pragma: ignore
"""
query_params = defaultdict(dict) # type: dict

if material_ids:
if isinstance(material_ids, str):
material_ids = [material_ids]

query_params.update({"material_ids": ",".join(validate_ids(material_ids))})

if battery_ids:
if isinstance(battery_ids, str):
battery_ids = [battery_ids]
Expand Down
1 change: 0 additions & 1 deletion tests/materials/test_electrodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def rester():
} # type: dict

custom_field_tests = {
"material_ids": ["mp-16722"],
"battery_ids": ["mp-16722_Al"],
"working_ion": Element("Li"),
"formula": "CoO2",
Expand Down
4 changes: 1 addition & 3 deletions tests/materials/test_robocrys.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ def test_client(rester):
assert doc.condensed_structure is not None


# TODO: switch this to the skipif once emmet PR 1261 is deployed to production
# @pytest.mark.skipif(os.getenv("MP_API_KEY", None) is None, reason="No API key found.")
@pytest.mark.skip(reason="Query with large result set fails with faceted pipeline")
@pytest.mark.skipif(os.getenv("MP_API_KEY", None) is None, reason="No API key found.")
def test_client_large_result_set(rester):
search_method = rester.search

Expand Down
1 change: 1 addition & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
# "tasks",
# "bonds",
"materials_xas",
"materials_tasks",
"materials_elasticity",
"materials_fermi",
"materials_alloys",
Expand Down
7 changes: 3 additions & 4 deletions tests/test_mprester.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
from pymatgen.entries.computed_entries import ComputedEntry, GibbsComputedStructureEntry
from pymatgen.io.cif import CifParser
from pymatgen.io.vasp import Chgcar
from pymatgen.phonon.bandstructure import PhononBandStructureSymmLine
from pymatgen.phonon.dos import PhononDos
from emmet.core.phonon import PhononDOS, PhononBS

from mp_api.client import MPRester
from mp_api.client.core.client import MPRestError
Expand Down Expand Up @@ -291,10 +290,10 @@ def test_get_ion_entries(self, mpr):

def test_get_phonon_data_by_material_id(self, mpr):
bs = mpr.get_phonon_bandstructure_by_material_id("mp-2172")
assert isinstance(bs, PhononBandStructureSymmLine)
assert isinstance(bs, PhononBS)

dos = mpr.get_phonon_dos_by_material_id("mp-2172")
assert isinstance(dos, PhononDos)
assert isinstance(dos, PhononDOS)

def test_get_charge_density_from_material_id(self, mpr):
chgcar = mpr.get_charge_density_from_material_id("mp-149")
Expand Down
Loading