-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rich reprs to STAC objects #508
Comments
This seems like an immensely useful feature to have, especially given the nested structure STAC has. PR #573 was closed since it used an extra dependency In case it didn't get made: would it perhaps be possible/convenient to only include cc: @moradology |
IMO, this would have to go in pystac itself to be worthwhile. https://ipython.readthedocs.io/en/stable/config/integrating.html#formatters-for-third-party-types mentions a way for third-party libraries to register formatters for types in other libraries, but that's not too user-friendly. I think an optional dependency is a good compromise. The try:
import jinja2
except ImportError:
return repr(self)
... And in case it's helpful, But I think that the nested nature of STAC objects means things like HTML dropdowns / disclosure triangles will be helpful. |
Closed by #743 |
IPython / jupyter define a protocol where objects defining methods like
_repr_html_
will have the ability to produce rich representations in a notebook. See https://ipython.readthedocs.io/en/stable/config/integrating.html.I think this would be very useful for exploring STAC objects. dask/distributed#4857 has some designs / code that might be worth stealing. In particular the handling of nested objects would apply to catalogs, collections, and even items.
See http://matthewrocklin.com/blog/2019/07/04/html-repr for some background.
The text was updated successfully, but these errors were encountered: