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
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
98c9982
Add an HTML page writer in case author is working outside of Jupyter
Jun 18, 2019
31c8f67
Merge branch 'master' into ajd/touchup
ajduberstein Jun 18, 2019
6b193a2
Update HTML rendering
Jun 22, 2019
c5ae157
Add the ability to display HTML in an iframe if the widget doesn't pr…
Jun 22, 2019
88b4e6a
Correct tests
Jun 22, 2019
34a5237
Change package.json
Jun 27, 2019
786d18b
Update build script
Jun 28, 2019
b30459c
Merge branch 'master' into ajd/touchup
Jun 28, 2019
2a6fdaa
Update package.json
Jun 28, 2019
15ce9e3
Support standalone HTML rendering
Jul 1, 2019
d4aa924
Merge branch 'master' into ajd/touchup
Jul 1, 2019
5a218a8
Add precommit hook script
Jul 2, 2019
b53f6dd
Change to executable
Jul 2, 2019
9cd54e0
Add pytest trigger when Python code is changed
Jul 2, 2019
98b89b4
Update screenshot tests to include pydeck without having to install i…
Jul 2, 2019
ab985b9
Specify python version specific requirements
Jul 2, 2019
f115768
Change requirements for dev
Jul 2, 2019
b569faa
Add additional requirement
Jul 2, 2019
776ab30
Ignore additional deprecation
Jul 2, 2019
a852674
Update typing extensions
Jul 2, 2019
b539e13
Change version of python tested
Jul 3, 2019
11df406
Change pyppeteer import strategy
Jul 3, 2019
b7ec497
Update requirements
Jul 3, 2019
c9f0e7e
Add typing
Jul 3, 2019
7257c2f
Add typing import
Jul 3, 2019
80bb086
Update .travis.yml
Jul 3, 2019
6d96801
Update travis
Jul 3, 2019
705a879
Update travis
Jul 3, 2019
c7f3379
Add arguments to bypass pyppeteer error
Jul 3, 2019
d97e371
Try moving setup location
Jul 3, 2019
a1149fe
Update travis
Jul 3, 2019
0f1f8df
Correct to headless and install additional dependencies
Jul 4, 2019
f8eedd7
Change headless parameter
Jul 4, 2019
e766142
Attempt to get pyppeteer working
Jul 4, 2019
08506da
Upgrade pytest
Jul 4, 2019
b0333cf
Avoid naked exceptions
Jul 5, 2019
3fccd37
Change screenshot utilities
Jul 5, 2019
3a22cf1
Travis update
Jul 6, 2019
d6752ef
Wait for element to render in pyppeteer
Jul 6, 2019
e0f6fcb
Merge branch 'master' into ajd/touchup
ajduberstein Jul 8, 2019
bf4cfcd
Add new doc strings
Jul 8, 2019
0df7cf0
Verify png output is correcct
Jul 9, 2019
797cb75
Verify screenshots render
Jul 9, 2019
b2949ad
Simplify conway example
Jul 9, 2019
54eb112
Raise sleep time
Jul 9, 2019
4d9f77f
Change sleep timer
Jul 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change screenshot utilities
  • Loading branch information
Andrew Duberstein committed Jul 5, 2019
commit 3fccd37efc1d2280555d33ab131552558b884702
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ matrix:
before_install:
# Enable user namespace cloning
- cd bindings/python/pydeck
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
- export DISPLAY=:99.0; sh -e ./usr/bin/xvfb-run start
python:
- '3.5'
- '2.7'
Expand Down
5 changes: 3 additions & 2 deletions bindings/python/pydeck/tests/browser/screenshot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ async def go_to_page_and_screenshot(url, file_name, output_dir='.', sleep_second
page_height = await get_notebook_page_height(page)
# Set viewport height to larger page height in order to capture entire page in a screenshot
await page.setViewport({'width': 768, 'height': page_height})
# Save out the screenshot
screenshot_path = os.path.join(output_dir, rename_png(file_name))
# Pytest passes POSIX paths, so we need to convert them to a string
str_path = str(output_dir)
screenshot_path = os.path.join(str_path, rename_png(file_name))
logging.info("Writing screenshot to %s" % screenshot_path)
await page._screenshotTask('png', {
'path': screenshot_path,
Expand Down
4 changes: 2 additions & 2 deletions bindings/python/pydeck/tests/browser/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@


def make_nb_url(ipynb, token):
return 'http://localhost:9876/notebooks/examples/' + urllib.parse.quote(ipynb) + '?token=' + token
return 'http://127.0.0.1:9876/notebooks/examples/' + urllib.parse.quote(ipynb) + '?token=' + token


async def start_notebook():
my_env = os.environ.copy()
my_env['PYTHONPATH'] = "{}".format(jupyter_execution_directory)
my_env['JUPYTER_TOKEN'] = token
return subprocess.Popen(
'./env3/bin/jupyter notebook --no-browser --port 9876',
'jupyter notebook --no-browser --port 9876 --ip 0.0.0.0 --allow-root',
shell=True,
cwd=jupyter_execution_directory,
env=my_env)
Expand Down