wolverton-research-group / qmpy

A suite of computational materials science tools.
https://oqmd.org
MIT License
129 stars 45 forks source link

Better package resource discovery #113

Open tachyontraveler opened 3 years ago

tachyontraveler commented 3 years ago

file discovery using os.path.dirname(__file__) is prone to several issues. One of them is the possibility of encountering errors when the package is installed as an egg. Another set of errors can occur when qmpy is installed on OSs other than Linux.

To fix these issues, we'd need to change the file discovery method from os.path to pkg_resources.resource_filename or similar dedicated package file discovery options

Another work is to be done on adding a pre-commit system to reformat qmpy scripts - possible using the package black

Thanks to @hegdevinayi for the ideas