ChemBioHTP / EnzyHTP

EnzyHTP is a python library that automates the complete life-cycle of enzyme modeling
https://enzyhtp-doc.readthedocs.io
Other
10 stars 1 forks source link

An inappropriate hard-coded string in the enzy_htp/chemical/enzyme_commission.py. #158

Open SwordJack opened 8 months ago

SwordJack commented 8 months ago

Hi Chris,

I'm recently writing testing to refactored EnzyHTP and I'm faced with an error displaying as follows.

====================================================================== short test summary info ======================================================================
ERROR test_protonate.py - FileNotFoundError: [Errno 2] No such file or directory: '/panfs/accrepfs.vampire/home/jurichc/EnzyHTP/enzy_htp/chemical/db.pickle'
========================================================================= 1 error in 0.36s ==========================================================================
ERROR: not found: /.../bin/EnzyHTP/test/preparation/test_protonate.py::test_protonate_ligand_with_pybel_7si9
(no name '/.../bin/EnzyHTP/test/preparation/test_protonate.py::test_protonate_ligand_with_pybel_7si9' in any of [<Module test_protonate.py>])

It is shocking that why I need a pickle file from an ACCRE path? Thus, I looked into the source code, only to find that in enzy_htp/chemical/enzyme_commission.py, line 32.

_DF = pickle.load(open('/panfs/accrepfs.vampire/home/jurichc/EnzyHTP/enzy_htp/chemical/db.pickle', 'rb'))

This hard-coded string, maybe is just a temporary placeholder, is not a good idea to be hard-coded here and merged to the develop_refactor branch. Could you implement some minor modifications to it so that we can run the test with non-ACCRE machines?

Thank you!

Best, Yinjie.