-
Notifications
You must be signed in to change notification settings - Fork 43
Description
The current python reprs of key classes are bare bones. For example the current repr of icechunk.Repository is just
<icechunk.repository.Repository at 0x12272f110>
These could be much nicer.
We also could have nice HTML reprs for each of these classes (like xarray objects do for example).
Adding these requires altering the __repr__ method and the _repr_html_ method on various classes. I have no idea how easy that is to do with the rust Py03 bindings though... @dcherian seemed to think it was really constraining 😕
Note on the design of these reprs: they should be nested. Most of IC's classes are basically dataclasses that have attributes that are also dataclasses. For example icechunk.Repository only has two attributes, which point to icechunk.RepositoryConfig and icechunk.Storage. Therefore the way to build these reprs should be to start at the bottom and build up, having each repr of the wrapping class call reprs of the wrapped classes. This can also work for html reprs, and is basically what xarray does (using dropdowns too).
Thoughts?