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

WIP: Fix getsize to be recursive #362

Closed
wants to merge 5 commits into from
Closed

WIP: Fix getsize to be recursive #362

wants to merge 5 commits into from

Conversation

jakirkham
Copy link
Member

@jakirkham jakirkham commented Dec 10, 2018

Fixes #253

Make sure the DirectoryStore's getsize method checks each directory recursively when computing the storage size of a directory.

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/tutorial.rst
  • Changes documented in docs/release.rst
  • Docs build locally (e.g., run tox -e docs)
  • AppVeyor and Travis CI passes
  • Test coverage is 100% (Coveralls passes)

Make sure the `DirectoryStore`'s `getsize` method checks each directory
recursively when computing the storage size of a directory.
@@ -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):
Copy link
Member Author

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.

Copy link
Member Author

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.

@jakirkham jakirkham added this to the v2.3 milestone Dec 10, 2018
As users expect `getsize` to be recursive, update our tests to ensure
`getsize`'s results are checked against what the recursive result would
be.
@jakirkham jakirkham modified the milestones: v2.3, v2.4 Mar 23, 2019
@alimanfoo
Copy link
Member

Hi @jakirkham, just going through some old emails and noticed this is still open. Did you want to revisit?

@jakirkham
Copy link
Member Author

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 🙂

@Carreau Carreau modified the milestones: v2.4, v2.5 Sep 9, 2020
@alimanfoo alimanfoo modified the milestones: v2.5, v2.6 Sep 24, 2020
@Carreau Carreau removed this from the v2.6 milestone Nov 30, 2020
@joshmoore
Copy link
Member

@jakirkham : can this be closed thanks to #431?

@jakirkham
Copy link
Member Author

Yep thanks for catching that

@jakirkham jakirkham closed this Feb 18, 2021
@jakirkham jakirkham deleted the fix_dir_getsize branch February 18, 2021 17:24
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.

Zarr DirectoryStore: getsize is wrong
4 participants