-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 an HTML page writer for pydeck #3250
Conversation
@@ -0,0 +1,76 @@ | |||
requirejs.config({ |
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.
This page is the crux of the frontend for iframe / standalone HTML page support. Here by "standalone" I mean "outside of a Jupyter environment."
Standalone pydeck uses a Jinja template and RequireJS to request dependencies at the time of page load.
You'll notice some code re-use here from the jupyter-widget module. Not sure of the best way of getting these functions here, having a linter apply itself to these files, etc.
Screen diff tests are applied to make sure the frontend isn't broken. See the screenshot utilities below, which use the Python wrapper around Puppeteer (which is used in the browser tests for deck.gl)
@@ -10,10 +10,10 @@ import { | |||
waitForElementToDisplay |
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.
Minimal changes here–essentially cleaning up the file to conform to patterns elsewhere in the repo (e.g., using import instead of require)
@@ -0,0 +1,11 @@ | |||
#!/bin/bash |
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.
Adds a Python commit hook that only runs if the Python bindings are modified. Extensible to other bindings.
Allows a user to write pydeck visualizations to a static HTML page
Background
Provides failover in case a widget can't be installed (e.g., because of user permissions on a notebook server)