hackingmaterials / matminer

Data mining for materials science
https://hackingmaterials.github.io/matminer/
Other
485 stars 194 forks source link

Defer `MPRester` import to allow it to act more like an optional dep #906

Closed ml-evs closed 1 year ago

ml-evs commented 1 year ago

There are some awkward version conflicts between pymatgen, mp_api and emmet, and as this package now tries to be agnostic to MPRester version, imports can error for some subset of versions. This PR defers the import of MPRester so that it only errors in cases where the user is trying to use it.