Skip to content

Fancy reprs for groups and arrays #2026

Open
@d-v-b

Description

@d-v-b

We should have nice reprs for the main Zarr objects, e.g. groups, arrays, stores, etc.

I don't have very specific ideas here, just a bunch of associated thoughts.

  • The array, group, and store reprs should all be designed so that people communicating about zarr issues find it natural to re-use these reprs as part of ordinary technical communication.
  • For environments where html can be rendered, e.g. jupyter, arrays could have something like dask's array repr. Expressing sharding will be an interesting challenge here.
  • For both arrays and groups, the attributes could be rendered under an expandable content element with a fixed-height preview.
  • We could ensure that the structured components of array metadata (codecs, etc) also have fancy html reprs, and these could compose in the array repr.
  • For groups, it would be nice to display a tree representing all the sub-groups and sub-arrays. But member discovery can be expensive; so we don't want to issue a bunch of (potentially recursive) requests just for the repr. We probably need to have a discussion about caching this kind of thing. With an abstract representation of a group, e.g. the kind proposed in the hierarchy api pr, then a repr can safely display the full known tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features or improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions