Update similarity.py to improve test coverage to 99%#295
Update similarity.py to improve test coverage to 99%#295FanwangM merged 5 commits intotheochem:mainfrom
Conversation
|
Hi Mentors @FarnazH @FanwangM @marco-2023 ! I submitted this PR (#295 ) improving test coverage in Thank you for your guidance! |
FanwangM
left a comment
There was a problem hiding this comment.
Thanks for the PR. The current PR adds an empty line after each docstring/code block, which should be avoided. This also makes the code unreadable. Please fix this and we will do further code review. Thanks.
|
Hi @FanwangM, I’ve updated the PR to address the formatting issues you pointed out. Please let me know if anything else needs improvement, happy to make further changes. |
|
Hi @mohini-aggarwal . Thanks for the updates. I have checked your current PR and noticed that you only added/deleted empty lines, without any actual content changes. Also, some changes violate the coding style we follow, e.g., PEP8. For example, you left only one empty line between two functions, whereas we usually have two. |
…erage from 76% to 99%
|
Hi @FanwangM @FarnazH @marco-2023
Please let me know if any further changes are required. Thank you!
|
There was a problem hiding this comment.
Pull request overview
Adds a new unit test module for selector.measures.similarity to increase coverage of the similarity utilities (pairwise similarity, scaling, and similarity indices).
Changes:
- Introduces
selector/measures/tests/test_similarity.pywith tests fortanimoto,modified_tanimoto,pairwise_similarity_bit,scaled_similarity_matrix, andsimilarity_index. - Adds negative-path tests for invalid dimensions, shape mismatches, and unsupported metric/index names.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @FanwangM,
|
FanwangM
left a comment
There was a problem hiding this comment.
Looks great to me. Thanks.


Uh oh!
There was an error while loading. Please reload this page.