aiida-core
aiida-core copied to clipboard
Implement _repr_html_ representation for base orm types
Pretty-printing ORM objects in jupyter notebooks
Jupyter notebooks / ipython allow objects to define special methods for rich display, see:
https://ipython.readthedocs.io/en/stable/config/integrating.html#rich-display
Specifically, it would be nice to implement HTML representation (_repr_html_
) for a nice printing in HTML notebooks. And we could then reuse this in AiiDAlab (which is where my motivation comes from).
Describe the solution you'd like
Display something nicer than this:
Describe alternatives you've considered
We could implement this as viewer widgets in aiidalab-widgets-base (and we already do for some types such as Dict) but I don't see a good reason why not integrate it to aiida-core so it can be easily used elsewhere as well.