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

Added Group.tree method

Open TomAugspurger opened this issue 1 year ago • 0 comments

Adds a Group.tree method for pretty printing a hierarchy.

Screenshot 2024-10-24 at 8 05 59 AM

For now the old expand keyword, which I think controlled whether the tree was expanded by default in the HTML output, is not implemented.

We have one design choice to make: should .tree return an object with a custom __repr__, or should it return the string itself? My preference, implemented here, is returning the object. That makes it easier to pipe into other applications other than the Python REPL. The cost is a bit more expansion of the public API.

Closes https://github.com/zarr-developers/zarr-python/issues/2406

  • [x] Add unit tests and/or doctests in docstrings
  • [x] Add docstrings and API docs for any new/modified user-facing classes and functions
  • [x] 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)

TomAugspurger avatar Oct 23 '24 14:10 TomAugspurger