Closed RMeli closed 1 year ago
Thank you for your feedback, I agree testing needs to be improved. We have now updated the unittests in test/test_openmm_plugin.py. Concerning example_script.py, it is currently used in the CI of conda-forge.
Thanks for updating the test and adding some more! I was able to run them with python -m coverage run -m unittest
and they all pass.
Ran 32 tests in 7.462s
OK
Coverage report:
Name Stmts Miss Cover
------------------------------------------------------------------------------------------------------
/home/rmeli/git/molearn/src/molearn/__init__.py 5 0 100%
/home/rmeli/git/molearn/src/molearn/data/__init__.py 2 0 100%
/home/rmeli/git/molearn/src/molearn/data/pdb_data.py 122 25 80%
/home/rmeli/git/molearn/src/molearn/loss_functions/__init__.py 3 0 100%
/home/rmeli/git/molearn/src/molearn/loss_functions/openmm_thread.py 262 121 54%
/home/rmeli/git/molearn/src/molearn/loss_functions/torch_protein_energy.py 213 191 10%
/home/rmeli/git/molearn/src/molearn/loss_functions/torch_protein_energy_utils.py 761 740 3%
/home/rmeli/git/molearn/src/molearn/trainers/__init__.py 5 0 100%
/home/rmeli/git/molearn/src/molearn/trainers/openmm_physics_trainer.py 39 28 28%
/home/rmeli/git/molearn/src/molearn/trainers/sinkhorn_trainer.py 206 170 17%
/home/rmeli/git/molearn/src/molearn/trainers/torch_physics_trainer.py 38 27 29%
/home/rmeli/git/molearn/src/molearn/trainers/trainer.py 202 169 16%
test_openmm_plugin.py 138 1 99%
------------------------------------------------------------------------------------------------------
TOTAL 1996 1472 26%
The only test in the
test
folder fails with the following error:While the functionality of the software can verified through the provided example notebooks and the scripts in the
examples
folder, I think the code could greatly benefit from some additional unit tests (and, eventually, the use of CI).This relates to my comment in #8; if tests, examples scripts, and notebooks are not run each time the main package is updated they are bound to diverge eventually.
Since the
example_script.py
is not testing anything (as far as I can tell), should it be moved elsewhere (for example theexamples
folder)?The only necessary action item here (IMO) is to fix the only test available.
From my understanding of JOSS criteria, building a more extensive test suite and adding CI is not required. Personally I'd strongly recommend it as it will benefit future development, but can be added in the future.
https://github.com/openjournals/joss-reviews/issues/5523