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

Extended IBioPolymerWithSetMods interface, changed hashcodes #811

Merged
merged 13 commits into from
Dec 12, 2024

Conversation

Alexander-Sol
Copy link
Contributor

@Alexander-Sol Alexander-Sol commented Dec 2, 2024

IBioPolymerWithSetMods is used as a dictionary key in MetaMorpheus. However, as it doesn't implement an IEquatable interface, equality comparison is done by reference, instead of by calling the Equals method (I think).

This PR adds the IEquatable interface to the IBioPolymerWithSetMods interface.

The HashCode methods for classes that implement IBioPolymerWithSetMods are still the same. This is fine, as the Equals method is used to make the final determination of what is and is not a unique entry in a dictionary.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 88.13559% with 7 lines in your changes missing coverage. Please review.

Project coverage is 77.23%. Comparing base (fed869f) to head (64a99ec).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...zLib/Transcriptomics/Digestion/OligoWithSetMods.cs 85.71% 1 Missing and 3 partials ⚠️
...roteolyticDigestion/PeptideWithSetModifications.cs 91.30% 0 Missing and 2 partials ⚠️
mzLib/Proteomics/Protein/Protein.cs 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #811      +/-   ##
==========================================
+ Coverage   77.21%   77.23%   +0.02%     
==========================================
  Files         218      218              
  Lines       32964    33014      +50     
  Branches     3413     3422       +9     
==========================================
+ Hits        25453    25499      +46     
+ Misses       6944     6942       -2     
- Partials      567      573       +6     
Files with missing lines Coverage Δ
mzLib/Omics/IBioPolymer.cs 0.00% <ø> (ø)
mzLib/Omics/IBioPolymerWithSetMods.cs 98.68% <ø> (ø)
mzLib/Transcriptomics/NucleicAcid.cs 93.00% <100.00%> (+0.92%) ⬆️
mzLib/Proteomics/Protein/Protein.cs 95.41% <75.00%> (-0.29%) ⬇️
...roteolyticDigestion/PeptideWithSetModifications.cs 95.88% <91.30%> (-0.05%) ⬇️
...zLib/Transcriptomics/Digestion/OligoWithSetMods.cs 87.55% <85.71%> (-0.24%) ⬇️

... and 1 file with indirect coverage changes

@Alexander-Sol Alexander-Sol requested a review from nbollis December 4, 2024 18:45
@trishorts trishorts merged commit 21c1702 into smith-chem-wisc:master Dec 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants