-
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
Use _repr_json_
rather than _repr_html_
#1130
Conversation
I really like this. Complete information, familiar format, less code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to add a _repr_json_
for an item collection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it was getting it via inheritance
Bummer indeed. I like the format you showed originally much better than the html. I'm a bit reluctant to just rip the HTML out, since so many folks use VSCode (and there may be other common environments where HTML is supported but JSON is not). I guess we could keep the html and just add json? |
Yeah... I guess we could roll our own html that looks like the output of |
Closing this for now since there is no built-in vscode support and it would take a non-trivial amount of work to implement a pretty json jinja template. |
Related Issue(s):
_repr_html_
causes GETs #1097, HTML rendering should show asset keys #1124Description:
This PR is pretty extreme, but basically it rips out all the jinja templates and
_repr_html_
methods and instead uses the ipython json display mechanism. To me this feels more like what I want to see as the display for a STAC object 🤷Pros:
_repr_html_
causes GETs #1097)Cons:
_repr_
in static view: https://github.com/stac-utils/pystac/blob/21b747e62e72b4906703ba91397bfc1ad6b1630c/docs/quickstart.ipynb_repr_
in classic notebookPR Checklist:
pre-commit
hooks pass locallyscripts/test
)