You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing automated unit tests would take this repo to the next level.
The current tests are more "does it run" tests.
We could use pytest for the python side and GTest for the C++ part. Although the python side is just a wrapper for the C++ library, so the python tests would probably suffice in most cases for correctness, while the C++ ones we could leave as "does it run".
I have never found a really good way to test for correctness in these kind of codes. Normally I test some limits (for instance, "does the doubly periodic code reproduces an open boundary when Lz>>Lx,Ly?"), but that can hide subtle bugs because you cannot have a lot of digits of precision. Ideas are welcome!
Writing automated unit tests would take this repo to the next level.
The current tests are more "does it run" tests.
We could use pytest for the python side and GTest for the C++ part. Although the python side is just a wrapper for the C++ library, so the python tests would probably suffice in most cases for correctness, while the C++ ones we could leave as "does it run".
I have never found a really good way to test for correctness in these kind of codes. Normally I test some limits (for instance, "does the doubly periodic code reproduces an open boundary when Lz>>Lx,Ly?"), but that can hide subtle bugs because you cannot have a lot of digits of precision. Ideas are welcome!
See for instance how I test the FCM in UAMMD: https://github.com/RaulPPelaez/UAMMD/blob/455a271dd270722e0fd4c8019fe9cafc7958bd57/test/BDHI/FCM/fcm_test.cu#L77
In addition to that, we should set up a Github CI to run these tests automatically on every new commit/PR.
In practice this amounts to having a special script in the repo that will compile and run the tests on a GH-provided machine. See for instance here https://github.com/openmm/openmm-torch/blob/master/.github/workflows/CI.yml
The text was updated successfully, but these errors were encountered: