Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further refine the unit tests of ensemble_md #49

Merged
merged 4 commits into from
Apr 22, 2024
Merged

Conversation

wehs7661
Copy link
Owner

@wehs7661 wehs7661 commented Apr 19, 2024

Now the code coverage has been enhanced to 96%. However, we want to further refine the tests by accomplishing the following tasks, as listed in #41.

  • Add unit tests for functionalities relevant to MT-REXEE, which are in replica_exchange_EE.py
    - [ ] Re-examine previously written tests to see if there are better ways to test the functions. Presumably a lot of tests could be made more rigorous/meaningful using unittest.mock. test_analyze_traj.py should be free from this since most of its tests have just been written recently.
  • Re-examine the missed lines to push the code coverage as much as possible.
  • Check if the warnings are actually harmless.
  • Add a UserWarning to msm_analysis.py to reflect the fact that the script msm_analysis.py is still a work in progress and we are not planning to expand or test the module in the short term.

Update: We have deferred the following task and noted it Issue #50

Re-examine previously written tests to see if there are better ways to test the functions. Presumably a lot of tests could be made more rigorous/meaningful using unittest.mock. test_analyze_traj.py should be free from this since most of its tests have just been written recently.

Copy link

codecov bot commented Apr 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.38%. Comparing base (27320da) to head (5175648).
Report is 21 commits behind head on master.

❗ Current head 5175648 differs from pull request most recent head 7faf9cf. Consider uploading reports for the commit 7faf9cf to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
+ Coverage   96.10%   98.38%   +2.28%     
==========================================
  Files          10       10              
  Lines        1950     1921      -29     
==========================================
+ Hits         1874     1890      +16     
+ Misses         76       31      -45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wehs7661
Copy link
Owner Author

The currently implemented unit tests could trigger 21 warnings when performed. 18 of them are either DeprecationWarning or MatplotlibDeprecation Warning, which are harmless for the short term. The other 3 are RuntimeWarning:

  • Two of them are from the first test of _df_combine_adjacent in analyze_free_energy.py. They are harmless.
  • The other is from the second test of traj2transmtx in analyze_traj.py. It is also harmless.

For more details please check the changes made here.

@wehs7661 wehs7661 self-assigned this Apr 22, 2024
@wehs7661 wehs7661 added the enhancement New feature or request label Apr 22, 2024
@wehs7661 wehs7661 merged commit 9a2f61a into master Apr 22, 2024
2 checks passed
@wehs7661 wehs7661 deleted the refine_tests branch April 22, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant