coarse-graining / cgnet

learning coarse-grained force fields
BSD 3-Clause "New" or "Revised" License
57 stars 26 forks source link

test cleanup #200

Closed nec4 closed 3 years ago

nec4 commented 3 years ago

Development:

Hello all. This PR is in response to #198 and addresses some intermittent test failures. In many places, I have raised the precisions of variables and adjusted certain tolerances. Two major fixes stand out:

  1. For GPU tests, radial basis functions are now properly instanced so that the tests run properly.
  2. In test_simulation.test_saving_numpy_coordinates(), the temporary filelist is now sorted (previously it was unsorted and this could lead to the loaded array being backwards). This does not affect the ability of simulations to be saved or loaded properly - it was just an issue with the test itself (and I think it might depend on how the os.listdir() sorts things by default).

All tests now pass for me and fave been PEP8 formatted. No changes to the main code have been made.

nec4 commented 3 years ago

Once this is merged, I will address #199 and #197.

brookehus commented 3 years ago

happy to check this out - is it ready for review? just let me know

nec4 commented 3 years ago

Yup! It's ready for review.

nec4 commented 3 years ago

Thanks for taking a look! I removed those print statements and reverted the assert line back to its original state. I reran the tests and they all pass for me. Let me know if there is anything else that can be changed or improved.