Skip to content

Commit 2b82e62

Browse files
Remove matminer from deps (#1082)
2 parents f9d31cf + 88a97eb commit 2b82e62

6 files changed

Lines changed: 27 additions & 83 deletions

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 = [

requirements/requirements-ubuntu-latest_py3.11.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ bibtexparser==1.4.4
1212
# via pymatgen-core
1313
blake3==1.0.8
1414
# via emmet-core
15-
boto3==1.42.89
15+
boto3==1.42.90
1616
# via mp-api (pyproject.toml)
17-
botocore==1.42.89
17+
botocore==1.42.90
1818
# via
1919
# boto3
2020
# s3transfer

requirements/requirements-ubuntu-latest_py3.11_extras.txt

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ blinker==1.9.0
4747
# via flask
4848
boltons==25.0.0
4949
# via mpcontribs-client
50-
boto3==1.42.89
50+
boto3==1.42.90
5151
# via mp-api (pyproject.toml)
52-
botocore==1.42.89
52+
botocore==1.42.90
5353
# via
5454
# boto3
5555
# s3transfer
@@ -213,7 +213,6 @@ joblib==1.5.3
213213
# via
214214
# pymatgen-analysis-diffusion
215215
# pymatgen-core
216-
# scikit-learn
217216
json2html==1.3.0
218217
# via mpcontribs-client
219218
jsonpointer==3.1.1
@@ -252,8 +251,6 @@ markupsafe==3.0.3
252251
# flask
253252
# jinja2
254253
# werkzeug
255-
matminer==0.10.1
256-
# via mp-api (pyproject.toml)
257254
matplotlib==3.10.8
258255
# via
259256
# ase
@@ -273,7 +270,6 @@ monty==2026.2.18
273270
# via
274271
# custodian
275272
# emmet-core
276-
# matminer
277273
# mp-api (pyproject.toml)
278274
# pymatgen-core
279275
more-itertools==11.0.2
@@ -310,7 +306,6 @@ numpy==2.4.4
310306
# ase
311307
# contourpy
312308
# imageio
313-
# matminer
314309
# matplotlib
315310
# monty
316311
# mpcontribs-client
@@ -320,7 +315,6 @@ numpy==2.4.4
320315
# pymatgen-core
321316
# pymatgen-io-validation
322317
# scikit-image
323-
# scikit-learn
324318
# scipy
325319
# seaborn
326320
# seekpath
@@ -346,9 +340,8 @@ packaging==26.1
346340
# sphinx
347341
palettable==3.3.3
348342
# via pymatgen-core
349-
pandas==2.3.3
343+
pandas==3.0.2
350344
# via
351-
# matminer
352345
# mpcontribs-client
353346
# pymatgen-core
354347
# seaborn
@@ -438,7 +431,6 @@ pyjwt[crypto]==2.12.1
438431
pymatgen==2026.3.23
439432
# via
440433
# emmet-core
441-
# matminer
442434
# mp-api (pyproject.toml)
443435
# mp-pyrho
444436
# mpcontribs-client
@@ -459,7 +451,6 @@ pymatgen-io-validation==0.1.2
459451
pymongo==4.16.0
460452
# via
461453
# emmet-core
462-
# matminer
463454
# mpcontribs-client
464455
pyparsing==3.3.2
465456
# via
@@ -499,9 +490,7 @@ python-dotenv==1.2.2
499490
python-multipart==0.0.26
500491
# via mcp
501492
pytz==2026.1.post1
502-
# via
503-
# bravado-core
504-
# pandas
493+
# via bravado-core
505494
pyyaml==6.0.3
506495
# via
507496
# bravado
@@ -520,7 +509,6 @@ requests==2.33.1
520509
# via
521510
# bravado
522511
# bravado-core
523-
# matminer
524512
# mp-api (pyproject.toml)
525513
# pymatgen-core
526514
# pymatgen-io-validation
@@ -555,15 +543,11 @@ s3transfer==0.16.0
555543
# via boto3
556544
scikit-image==0.26.0
557545
# via pymatgen-analysis-defects
558-
scikit-learn==1.8.0
559-
# via matminer
560546
scipy==1.17.1
561547
# via
562548
# ase
563-
# matminer
564549
# pymatgen-core
565550
# scikit-image
566-
# scikit-learn
567551
seaborn==0.13.2
568552
# via pymatgen-analysis-diffusion
569553
secretstorage==3.5.0
@@ -616,18 +600,13 @@ swagger-spec-validator==3.0.4
616600
# bravado-core
617601
# mpcontribs-client
618602
sympy==1.14.0
619-
# via
620-
# matminer
621-
# pymatgen-core
603+
# via pymatgen-core
622604
tabulate==0.10.0
623605
# via pymatgen-core
624-
threadpoolctl==3.6.0
625-
# via scikit-learn
626606
tifffile==2026.3.3
627607
# via scikit-image
628608
tqdm==4.67.3
629609
# via
630-
# matminer
631610
# mpcontribs-client
632611
# pymatgen-core
633612
traitlets==5.14.3
@@ -672,9 +651,7 @@ typing-inspection==0.4.2
672651
# pydantic
673652
# pydantic-settings
674653
tzdata==2026.1
675-
# via
676-
# arrow
677-
# pandas
654+
# via arrow
678655
ujson==5.12.0
679656
# via mpcontribs-client
680657
uncalled-for==0.3.1

requirements/requirements-ubuntu-latest_py3.12.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ bibtexparser==1.4.4
1212
# via pymatgen-core
1313
blake3==1.0.8
1414
# via emmet-core
15-
boto3==1.42.89
15+
boto3==1.42.90
1616
# via mp-api (pyproject.toml)
17-
botocore==1.42.89
17+
botocore==1.42.90
1818
# via
1919
# boto3
2020
# s3transfer

requirements/requirements-ubuntu-latest_py3.12_extras.txt

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ blinker==1.9.0
4545
# via flask
4646
boltons==25.0.0
4747
# via mpcontribs-client
48-
boto3==1.42.89
48+
boto3==1.42.90
4949
# via mp-api (pyproject.toml)
50-
botocore==1.42.89
50+
botocore==1.42.90
5151
# via
5252
# boto3
5353
# s3transfer
@@ -209,7 +209,6 @@ joblib==1.5.3
209209
# via
210210
# pymatgen-analysis-diffusion
211211
# pymatgen-core
212-
# scikit-learn
213212
json2html==1.3.0
214213
# via mpcontribs-client
215214
jsonpointer==3.1.1
@@ -248,8 +247,6 @@ markupsafe==3.0.3
248247
# flask
249248
# jinja2
250249
# werkzeug
251-
matminer==0.10.1
252-
# via mp-api (pyproject.toml)
253250
matplotlib==3.10.8
254251
# via
255252
# ase
@@ -269,7 +266,6 @@ monty==2026.2.18
269266
# via
270267
# custodian
271268
# emmet-core
272-
# matminer
273269
# mp-api (pyproject.toml)
274270
# pymatgen-core
275271
more-itertools==11.0.2
@@ -306,7 +302,6 @@ numpy==2.4.4
306302
# ase
307303
# contourpy
308304
# imageio
309-
# matminer
310305
# matplotlib
311306
# monty
312307
# mpcontribs-client
@@ -316,7 +311,6 @@ numpy==2.4.4
316311
# pymatgen-core
317312
# pymatgen-io-validation
318313
# scikit-image
319-
# scikit-learn
320314
# scipy
321315
# seaborn
322316
# seekpath
@@ -342,9 +336,8 @@ packaging==26.1
342336
# sphinx
343337
palettable==3.3.3
344338
# via pymatgen-core
345-
pandas==2.3.3
339+
pandas==3.0.2
346340
# via
347-
# matminer
348341
# mpcontribs-client
349342
# pymatgen-core
350343
# seaborn
@@ -434,7 +427,6 @@ pyjwt[crypto]==2.12.1
434427
pymatgen==2026.3.23
435428
# via
436429
# emmet-core
437-
# matminer
438430
# mp-api (pyproject.toml)
439431
# mp-pyrho
440432
# mpcontribs-client
@@ -455,7 +447,6 @@ pymatgen-io-validation==0.1.2
455447
pymongo==4.16.0
456448
# via
457449
# emmet-core
458-
# matminer
459450
# mpcontribs-client
460451
pyparsing==3.3.2
461452
# via
@@ -495,9 +486,7 @@ python-dotenv==1.2.2
495486
python-multipart==0.0.26
496487
# via mcp
497488
pytz==2026.1.post1
498-
# via
499-
# bravado-core
500-
# pandas
489+
# via bravado-core
501490
pyyaml==6.0.3
502491
# via
503492
# bravado
@@ -516,7 +505,6 @@ requests==2.33.1
516505
# via
517506
# bravado
518507
# bravado-core
519-
# matminer
520508
# mp-api (pyproject.toml)
521509
# pymatgen-core
522510
# pymatgen-io-validation
@@ -551,15 +539,11 @@ s3transfer==0.16.0
551539
# via boto3
552540
scikit-image==0.26.0
553541
# via pymatgen-analysis-defects
554-
scikit-learn==1.8.0
555-
# via matminer
556542
scipy==1.17.1
557543
# via
558544
# ase
559-
# matminer
560545
# pymatgen-core
561546
# scikit-image
562-
# scikit-learn
563547
seaborn==0.13.2
564548
# via pymatgen-analysis-diffusion
565549
secretstorage==3.5.0
@@ -612,18 +596,13 @@ swagger-spec-validator==3.0.4
612596
# bravado-core
613597
# mpcontribs-client
614598
sympy==1.14.0
615-
# via
616-
# matminer
617-
# pymatgen-core
599+
# via pymatgen-core
618600
tabulate==0.10.0
619601
# via pymatgen-core
620-
threadpoolctl==3.6.0
621-
# via scikit-learn
622602
tifffile==2026.4.11
623603
# via scikit-image
624604
tqdm==4.67.3
625605
# via
626-
# matminer
627606
# mpcontribs-client
628607
# pymatgen-core
629608
traitlets==5.14.3
@@ -665,9 +644,7 @@ typing-inspection==0.4.2
665644
# pydantic
666645
# pydantic-settings
667646
tzdata==2026.1
668-
# via
669-
# arrow
670-
# pandas
647+
# via arrow
671648
ujson==5.12.0
672649
# via mpcontribs-client
673650
uncalled-for==0.3.1

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)