Skip to content

Commit 4be66cc

Browse files
actually remove matminer from mp-api deps
1 parent f9d31cf commit 4be66cc

2 files changed

Lines changed: 11 additions & 21 deletions

File tree

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ all = [
4040
"emmet-core[all]>=0.86.4rc1,<0.86.5",
4141
"fastmcp",
4242
"flask",
43-
"matminer>=0.10.0",
4443
"mpcontribs-client>=5.10",
4544
]
4645
test = [

tests/client/materials/test_similarity.py

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212
from mp_api.client.routes.materials.similarity import SimilarityRester
1313

1414

15-
try:
16-
import matminer
17-
except ImportError:
18-
matminer = None
19-
20-
2115
@pytest.fixture(scope="module")
2216
def test_struct():
2317
poscar = """Al2
@@ -59,21 +53,18 @@ def test_similarity_search():
5953
def test_similarity_vector_search(test_struct):
6054
rester = SimilarityRester()
6155

62-
# skip these tests if `matminer` is not installed
63-
if matminer is not None:
64-
fv = rester.fingerprint_structure(test_struct)
65-
assert isinstance(fv, np.ndarray)
66-
assert len(fv) == 122
67-
assert isinstance(rester._fingerprinter, SimilarityScorer)
68-
69-
assert all(
70-
isinstance(entry, SimilarityEntry)
71-
and isinstance(entry.dissimilarity, float)
72-
for entry in rester.find_similar(
73-
test_struct,
74-
top=2,
75-
)
56+
fv = rester.fingerprint_structure(test_struct)
57+
assert isinstance(fv, np.ndarray)
58+
assert len(fv) == 122
59+
assert isinstance(rester._fingerprinter, SimilarityScorer)
60+
61+
assert all(
62+
isinstance(entry, SimilarityEntry) and isinstance(entry.dissimilarity, float)
63+
for entry in rester.find_similar(
64+
test_struct,
65+
top=2,
7666
)
67+
)
7768

7869
get_top = 5
7970
sim_entries = rester.find_similar("mp-149", top=get_top)

0 commit comments

Comments
 (0)