Skip to content

Make Checksum32 an ABC #711

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

Merged
merged 1 commit into from
Apr 3, 2025
Merged

Conversation

dstansby
Copy link
Contributor

@dstansby dstansby commented Mar 1, 2025

Since it's not intended to be used without sub-classing, make Checksum32 an ABC. This also means we can catch any sub-classes that don't implement checksum() more easily.

Copy link

codecov bot commented Mar 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (a2bdbe5) to head (d01f00d).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #711   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files          63       63           
  Lines        2754     2761    +7     
=======================================
+ Hits         2753     2760    +7     
  Misses          1        1           
Files with missing lines Coverage Δ
numcodecs/checksum32.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dstansby dstansby added the needs changelog Needs a changelog entry writing label Mar 3, 2025
@dstansby dstansby merged commit 725cf25 into zarr-developers:main Apr 3, 2025
26 checks passed
@dstansby dstansby deleted the checksum32-abc branch April 3, 2025 11:39
"deprecated"
]
readme = "README.rst"
dependencies = ["numpy>=1.24", "deprecated", "typing_extensions"]
Copy link
Member

@jakirkham jakirkham Apr 7, 2025

Choose a reason for hiding this comment

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

Let's not unwrap this

Edit: To clarify, having this broken out with 1 dependency per line makes it easier to see what was added/removed in the diff. This in turn helps when updating in other package metadata elsewhere (like conda-forge or Linux distros)

@jakirkham
Copy link
Member

In the future @dstansby can you please request a review?

Comment on lines 112 to 113
class JenkinsLookup3(Checksum32):
"""Bob Jenkin's lookup3 checksum with 32-bit output
Copy link
Member

Choose a reason for hiding this comment

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

It appears the checksum method was not added here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs changelog Needs a changelog entry writing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants