SCM-NV / PLAMS

Python Library for Automating Molecular Simulations
https://www.scm.com/doc/plams
Other
65 stars 24 forks source link

ASE has been (improperly) made a hard dependency #117

Closed BvB93 closed 2 years ago

BvB93 commented 2 years ago

Commit https://github.com/SCM-NV/PLAMS/commit/a2ab84fd5e1b2a9c3f22985e71e5ebe421abd00e introduced some new ASE-related features, including a new module. The problem is that the ASE imports are not guarded behind a try/except block and __all__ is unconditionally populated with the module's content, thus turning ASE into a hard depdency of PLAMS without it being properly specified in setup.py (breaking any pip-based installation of PLAMS).

See the example below for an example within PLAMS where such an optional-import guard is successfully implemented: https://github.com/SCM-NV/PLAMS/blob/47370526563f591635ce1825020cecbeae4aee07/interfaces/molecule/rdkit.py#L23-L27

BvB93 commented 2 years ago

Issue has been resolved as of https://github.com/SCM-NV/PLAMS/commit/6b9f60e6a61db68a99092b4b26e550b68e66ccff, thanks Paul!