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

Fix MethodError when hashing Pair #74

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

rasmushenningsson
Copy link
Contributor

Description

Before this PR, stable_hash(2=>3, HashVersion{4}()) fails with a MethodError.
See #71

This PR fixes this by implementing internal_type_structure for Pair, which was needed since keytype and valuetype are not defined for Pair.
It also adds unit tests.

This PR should not affect any benchmarks.

* Add `internal_type_structure` for `Pair` since `keytype` and
`valuetype` are not defined for `Pair`.
* Add unit test for hashing `Pair`.
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.57%. Comparing base (8d5f71c) to head (12d28fb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
+ Coverage   93.55%   93.57%   +0.01%     
==========================================
  Files           7        7              
  Lines         667      669       +2     
==========================================
+ Hits          624      626       +2     
  Misses         43       43              

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

@haberdashPI haberdashPI self-requested a review October 8, 2024 15:06
Copy link
Member

@haberdashPI haberdashPI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Thanks for your contribution!!

I made a few small adjustments in CI (due to Julia 1.11 being released) and added a comment to explain the new method.

@haberdashPI haberdashPI merged commit 65b918c into beacon-biosignals:main Oct 8, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants