zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

Feature: store learns to delete prefixes when overwriting/creating hierarchy nodes

Open jhamman opened this issue 1 year ago • 0 comments

This PR implements delete_dir teaches the Group and Array classes to use it when overwriting nodes in a hierarchy.

Also included here:

  • delete_prefix - not used but perhaps we should just use it instead of delete_dir
  • changes list_prefix to return absolute paths instead of stripping prefix. Given that list_prefix was unused before, this wasn't very disruptive but calling it out so others can help decide if this is what we want.

Still needs:

  • new store tests for delete_dir
  • new group tests for edge cases around delete_dir

closes https://github.com/zarr-developers/zarr-python/issues/2191 first steps toward https://github.com/zarr-developers/zarr-python/issues/2108 and #2359

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
  • [ ] GitHub Actions have all passed
  • [ ] Test coverage is 100% (Codecov passes)

jhamman avatar Oct 22 '24 13:10 jhamman