-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
67 changed files
with
3,016 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.ipynb | ||
*.pyc | ||
__pycache__ | ||
*.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[run] | ||
omit = DeckGLWidget/tests/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask instance folder | ||
instance/ | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/source/_static/embed-bundle.js | ||
docs/source/_static/embed-bundle.js.map | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# IPython Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# ========================= | ||
# Operating System Files | ||
# ========================= | ||
|
||
# OSX | ||
# ========================= | ||
|
||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
# Windows | ||
# ========================= | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
|
||
# NPM | ||
# ---- | ||
|
||
**/node_modules/ | ||
DeckGLWidget/nbextension/static/index.* | ||
DeckGLWidget/labextension/*.tgz | ||
|
||
# Coverage data | ||
# ------------- | ||
**/coverage/ | ||
|
||
# Packed lab extensions | ||
DeckGLWidget/labextension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.DS_Store | ||
node_modules/ | ||
tests/ | ||
.jshintrc | ||
# Ignore any build output from python: | ||
dist/*.tar.gz | ||
dist/*.wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
language: python | ||
python: | ||
- 3.7 | ||
- 3.6 | ||
- 3.5 | ||
sudo: false | ||
dist: xenial | ||
services: | ||
- xvfb | ||
addons: | ||
apt_packages: | ||
- pandoc | ||
env: | ||
matrix: | ||
- GROUP=python | ||
matrix: | ||
include: | ||
- python: 3.5 | ||
env: GROUP=js | ||
include: | ||
- python: 3.6 | ||
env: GROUP=docs | ||
cache: | ||
pip: true | ||
directories: | ||
- node_modules # NPM packages | ||
- $HOME/.npm | ||
before_install: | ||
- pip install -U pip setuptools | ||
- nvm install 8 | ||
- | | ||
if [[ $GROUP == python ]]; then | ||
pip install codecov | ||
elif [[ $GROUP == js ]]; then | ||
npm install -g codecov | ||
fi | ||
install: | ||
- | | ||
if [[ $GROUP == python ]]; then | ||
pip install --upgrade ".[test]" -v | ||
elif [[ $GROUP == js ]]; then | ||
pip install --upgrade -e ".[test]" -v | ||
elif [[ $GROUP == docs ]]; then | ||
pip install --upgrade ".[test, examples, docs]" -v | ||
fi | ||
before_script: | ||
# Set up a virtual screen for Firefox browser testing: | ||
- | | ||
if [[ $GROUP == js ]]; then | ||
export CHROME_BIN=chromium-browser | ||
fi | ||
git config --global user.email travis@fake.com | ||
git config --global user.name "Travis CI" | ||
script: | ||
- | | ||
if [[ $GROUP == python ]]; then | ||
EXIT_STATUS=0 | ||
pushd $(mktemp -d) | ||
py.test -l --cov-report xml:$TRAVIS_BUILD_DIR/coverage.xml --cov=DeckGLWidget --pyargs DeckGLWidget || EXIT_STATUS=$? | ||
popd | ||
(exit $EXIT_STATUS) | ||
elif [[ $GROUP == js ]]; then | ||
npm test | ||
elif [[ $GROUP == docs ]]; then | ||
EXIT_STATUS=0 | ||
cd docs | ||
make html || EXIT_STATUS=$? | ||
make linkcheck || EXIT_STATUS=$? | ||
cd .. | ||
python -m pytest_check_links --links-ext=.md -o testpaths=. -o addopts= || EXIT_STATUS=$? | ||
(exit $EXIT_STATUS) | ||
fi | ||
after_success: | ||
- codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"load_extensions": { | ||
"DeckGLWidget/extension": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
# Copyright (c) Uber Technologies, Inc. | ||
# Distributed under the terms of the Modified BSD License. | ||
|
||
from .deckgl_widget import DeckGLWidget # noqa | ||
from ._version import __version__, version_info # noqa | ||
|
||
from .nbextension import _jupyter_nbextension_paths # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
# Copyright (c) Andrew Duberstein. | ||
# Distributed under the terms of the Modified BSD License. | ||
|
||
""" | ||
Information about the frontend package of the widgets. | ||
""" | ||
|
||
module_name = "deckgl-widget" | ||
module_version = "^0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
# Copyright (c) Andrew Duberstein. | ||
# Distributed under the terms of the Modified BSD License. | ||
|
||
version_info = (0, 1, 0, 'dev') | ||
__version__ = ".".join(map(str, version_info)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
# Copyright (c) Uber Technologies, Inc. | ||
# Distributed under the terms of the Modified BSD License. | ||
|
||
""" | ||
TODO: Add module docstring | ||
""" | ||
from __future__ import unicode_literals | ||
import os | ||
|
||
import ipywidgets as widgets | ||
from traitlets import Unicode | ||
|
||
from ._frontend import module_name, module_version | ||
|
||
|
||
class DeckGLWidget(widgets.DOMWidget): | ||
_model_name = Unicode('DeckGLModel').tag(sync=True) | ||
_model_module = Unicode(module_name).tag(sync=True) | ||
_model_module_version = Unicode(module_version).tag(sync=True) | ||
_view_name = Unicode('DeckGLView').tag(sync=True) | ||
_view_module = Unicode(module_name).tag(sync=True) | ||
_view_module_version = Unicode(module_version).tag(sync=True) | ||
mapbox_key = Unicode(os.getenv('MAPBOX_API_KEY')).tag(sync=True) | ||
json_input = Unicode('').tag(sync=True) | ||
tile_url = Unicode('').tag(sync=True) |
13 changes: 13 additions & 0 deletions
13
bindings/python/deck-widget/DeckGLWidget/nbextension/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
# Copyright (c) Andrew Duberstein | ||
# Distributed under the terms of the Modified BSD License. | ||
|
||
def _jupyter_nbextension_paths(): | ||
return [{ | ||
'section': 'notebook', | ||
'src': 'nbextension/static', | ||
'dest': 'DeckGLWidget', | ||
'require': 'DeckGLWidget/extension' | ||
}] |
17 changes: 17 additions & 0 deletions
17
bindings/python/deck-widget/DeckGLWidget/nbextension/static/extension.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Entry point for the notebook bundle containing custom model definitions. | ||
// | ||
define(function() { | ||
"use strict"; | ||
|
||
window['requirejs'].config({ | ||
map: { | ||
'*': { | ||
'deckgl-widget': 'nbextensions/DeckGLWidget/index', | ||
}, | ||
} | ||
}); | ||
// Export the required load_ipython_extension function | ||
return { | ||
load_ipython_extension : function() {} | ||
}; | ||
}); |
Empty file.
Oops, something went wrong.