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

feat: add deterministic hash methods to all types #573

Merged
merged 5 commits into from
Mar 18, 2024

Conversation

WinPlay02
Copy link
Contributor

@WinPlay02 WinPlay02 commented Mar 15, 2024

Summary of Changes

  • feat: add deterministic __hash__ methods to the all types
  • test: add tests to all new hash implementations
  • feat: add __eq__ method to TaggedTable and TimeSeries

The __hash__-Implementation is needed to more efficiently check whether data may be the same.
A deterministic implementation is used (based on xxhash, a fast non-cryptographic hash algorithm) to allow these comparisons to be performed across different interpreters (processes).

The implementation of the Schema was updated to be deterministic.

test: add tests to all new hash implementations
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (dbdf11e) to head (a3b3837).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #573   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           50        50           
  Lines         2915      2956   +41     
=========================================
+ Hits          2915      2956   +41     

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

@WinPlay02 WinPlay02 marked this pull request as ready for review March 15, 2024 14:57
@WinPlay02 WinPlay02 requested review from a team and lars-reimann as code owners March 15, 2024 14:57
@WinPlay02 WinPlay02 changed the title feat: add deterministic hash methods to the all types feat: add deterministic hash methods to all types Mar 15, 2024
Copy link
Member

@lars-reimann lars-reimann left a comment

Choose a reason for hiding this comment

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

Looks great.

@lars-reimann lars-reimann merged commit f6a3ca7 into Safe-DS:main Mar 18, 2024
8 checks passed
lars-reimann pushed a commit that referenced this pull request Apr 3, 2024
## [0.20.0](v0.19.0...v0.20.0) (2024-04-03)

### Features

* add deterministic hash methods to all types ([#573](#573)) ([f6a3ca7](f6a3ca7))
* add fnn functionality ([#529](#529)) ([ce53153](ce53153)), closes [#522](#522)
* add suffixes to models to indicate their task ([#588](#588)) ([d490dee](d490dee))
* added lag_plot ([#548](#548)) ([0fb38d2](0fb38d2)), closes [#519](#519)
* added normal plot for time series ([#550](#550)) ([dbdf11e](dbdf11e)), closes [#549](#549)
* when using from table to time series feature must be given ([#572](#572)) ([ca23f0f](ca23f0f)), closes [#571](#571)

### Bug Fixes

* incorrect type hint for `number_of_bins` parameter ([#567](#567)) ([b434e53](b434e53))
* mark various API elements as internal ([#587](#587)) ([ea176fc](ea176fc)), closes [#582](#582) [#585](#585)
@lars-reimann
Copy link
Member

🎉 This PR is included in version 0.20.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Included in a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants