materialsproject / api

New API client for the Materials Project
https://materialsproject.github.io/api/
Other
105 stars 34 forks source link

Read API key from `pymatgen` config #856

Closed janosh closed 9 months ago

janosh commented 9 months ago

Brings behavior more in line with legacy rester in pymatgen.ext.matproj which looks for API key in ~/.config/.pmgrc.yaml if not passed explicitly.

munrojm commented 9 months ago

Thanks @janosh!

janosh commented 9 months ago

Test failure here seems unrelated

FAILED tests/materials/test_eos.py::test_client - mp_api.client.core.client.MPRestError: REST query returned with error status code 400 on URL https://api.materialsproject.org/materials/eos/?energies_min=-100.12&energies_max=100.12&_all_fields=True&_limit=1 with message:
Request contains query parameters which cannot be used: energies_min, energies_max
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
= 1 failed, 63 passed, 3 skipped, 3 xfailed, 251 warnings in 150.20s (0:02:30) =