-
-
Notifications
You must be signed in to change notification settings - Fork 329
WIP: Fix getsize
to be recursive
#362
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
Make sure the `DirectoryStore`'s `getsize` method checks each directory recursively when computing the storage size of a directory.
zarr/tests/test_storage.py
Outdated
@@ -210,7 +210,7 @@ def test_hierarchy(self): | |||
store['c/d/x'] | |||
|
|||
# test getsize (optional) | |||
if hasattr(store, 'getsize'): | |||
if hasattr(store, 'getsize') and not isinstance(store, DirectoryStore): |
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.
Skipped DirectoryStore
instances as we were not seeing the exact same sizes on disk as recorded here.
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.
Actually it looks like if we expect a recursive storage size check, the tests below are incorrect (e.g. store.getsize() == 15
). So am a bit confused about what behavior we would like to have going forward.
As users expect `getsize` to be recursive, update our tests to ensure `getsize`'s results are checked against what the recursive result would be.
Hi @jakirkham, just going through some old emails and noticed this is still open. Did you want to revisit? |
Sure happy to do that. Though it may take me a little bit to get back to this. So it's totally fine if someone beats me to it 🙂 |
@jakirkham : can this be closed thanks to #431? |
Yep thanks for catching that |
Fixes #253
Make sure the
DirectoryStore
'sgetsize
method checks each directory recursively when computing the storage size of a directory.TODO:
tox -e docs
)