salilab / imp

The Integrative Modeling Platform
https://integrativemodeling.org
GNU General Public License v3.0
74 stars 30 forks source link

Consider requiring Python `pathlib` module #1061

Closed benmwebb closed 2 years ago

benmwebb commented 2 years ago

Various IMP modules (e.g. IMP.pmi, IMP.sampcon) do a lot of path manipulation, usually via ugly string concatenation, sometimes using os.path.join. Consider making IMP require the pathlib module and replacing some or all of this code with the much nicer Path class. This would require Python 3.4 or later, although users that still insist on Python 2 can get pathlib backported to Python 2 (for example, RHEL 7 provides a python-pathlib RPM, or pip install pathlib should work).