Skip to content
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

Merged
merged 46 commits into from
Jul 9, 2019
Merged

Add an HTML page writer for pydeck #3250

merged 46 commits into from
Jul 9, 2019

Conversation

ajduberstein
Copy link
Collaborator

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)

@coveralls
Copy link

coveralls commented Jun 18, 2019

Coverage Status

Coverage increased (+0.02%) to 79.197% when pulling 4d9f77f on ajd/touchup into 2774c95 on master.

@@ -0,0 +1,76 @@
requirejs.config({
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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.

@ajduberstein ajduberstein merged commit 1c223eb into master Jul 9, 2019
@ajduberstein ajduberstein deleted the ajd/touchup branch July 9, 2019 23:33
ajduberstein added a commit that referenced this pull request Jul 13, 2019
ajduberstein added a commit that referenced this pull request Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants