-
Notifications
You must be signed in to change notification settings - Fork 27
Changed sum(.) to reduce(., init=0) in storagesize functions #198
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
Conversation
Pull Request Test Coverage Report for Build 17361585816Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the fix. Ideally, adding a test for an empty array where staoragesize errors on current master would be great to avoid breaking things again in the future, but can as well be merged IMO.
This commit adds tests that demonstrate the issue reported in #197 where calling zinfo() on an empty array (with no initialized chunks) fails with an ArgumentError on DirectoryStore. The tests will fail on master but pass after PR #198 is merged. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I added a test in #209.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sum takes init too
Fixes #197
Changed storagesize implementation for DirectoryStore so it doesn't break when no chunks are initialized by replacing sum(.) with reduce(., init=0). Also changed DictStore implementation to match even though it was technically not broken before.