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

DOC: utils.hash() is not influenced by names #443

Merged
merged 2 commits into from
Jun 24, 2024
Merged

DOC: utils.hash() is not influenced by names #443

merged 2 commits into from
Jun 24, 2024

Conversation

hagenw
Copy link
Member

@hagenw hagenw commented Jun 24, 2024

Closes #434

audformat.utils.hash() does only consider values, not level/column names.
To make this more obvious, I added a sentence to the docs:

image

I also added tests for the expected behavior.

@hagenw hagenw requested a review from ChristianGeng June 24, 2024 10:00
Copy link
Member

@ChristianGeng ChristianGeng left a comment

Choose a reason for hiding this comment

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

Review

This MR extends testing of the hashing approach for asserting invariance of the hash

  • when index name changes for series and data frames
  • column names change for data frames.

The resulting hashes are hardcoded which will therefore also detect changes in the unlikely case that the underlying numpy hashing implementation is changed.

This can be counted as approved.

@hagenw hagenw merged commit 642984d into main Jun 24, 2024
10 checks passed
@hagenw hagenw deleted the doc-hash-names branch June 24, 2024 11:07
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.

audformat.utils.hash() does not consider column names
2 participants