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

Refactor Styletron/BaseUI providers out of data filter example app file. #4047

Merged
merged 86 commits into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
7889163
Fix gallery examples (#4043)
Pessimistress Dec 18, 2019
3ccb103
Fix bundle transpilation (#4042)
Pessimistress Dec 18, 2019
f80a763
Fix broken links in docs (#4041)
Pessimistress Dec 18, 2019
2078c98
AggregationLayer : Improve aggregation state management (#4008)
1chandu Dec 18, 2019
6899940
AggregationLayers: Update and improve unit test coverage. (#4046)
1chandu Dec 18, 2019
2065d28
Refactor Styletron/BaseUI providers out of data filter example app file.
tgorkin Dec 18, 2019
9c2a962
fix bundle transpilation (#4048)
Pessimistress Dec 19, 2019
bf5cee0
Looks like these methods have been deprecated (#4049)
lukemcgregor Dec 19, 2019
933ef9a
[WIP] Fix frustum plane calculation (#4050)
Pessimistress Dec 19, 2019
7577393
Fix `layer.projectPositions` with default coordinate system (#4056)
Pessimistress Dec 19, 2019
f98c5ce
Clean up experimental examples (#4054)
Pessimistress Dec 19, 2019
4e7a6a1
Frustum test app: draw frustum planes (#4059)
Pessimistress Dec 19, 2019
de8baba
Bump loaders and fix infinite updateState calls (#4061)
Dec 20, 2019
8815f19
AggregationLayer: various fixes (#4062)
1chandu Dec 20, 2019
1549262
fix Tile3DLayer docs (#4063)
Pessimistress Dec 20, 2019
7bd2182
fix 3d tiles culling (#4064)
Pessimistress Dec 20, 2019
8feb27f
Fix the url to tile 3d layer example (#3814)
Oct 29, 2019
8bcb94f
Bump dependencies to production versions (#4066)
Pessimistress Dec 21, 2019
9984d0e
Fix playground 3d tiles demos (#4067)
Pessimistress Dec 21, 2019
4f02eb9
set React wrapper's z-index (#4068)
Pessimistress Dec 21, 2019
d9e7859
improve version detection (#4070)
Pessimistress Dec 23, 2019
8ee1ab9
Fix hover event bubbling (#4071)
Pessimistress Dec 23, 2019
74d0d9f
Bump dependencies (#4074)
Pessimistress Dec 23, 2019
e2b76a3
Bump handlebars from 4.2.0 to 4.5.3 (#4076)
dependabot[bot] Dec 30, 2019
600ba38
pydeck: Add pydeck release checklist (#4083)
ajduberstein Jan 2, 2020
0a86e91
Fix flyToInterpolator crash when transitioning to the same view… (#4084)
Pessimistress Jan 2, 2020
dd628df
Clean up hover handling (#4081)
Pessimistress Jan 2, 2020
5c9b7c1
warn if initialViewState and viewState are both present (#4078)
Pessimistress Jan 2, 2020
8eebb82
clean up prop handling (#4080)
Pessimistress Jan 2, 2020
39365d1
@deck.gl/jupyter-widget: Change version variable for CDN-based Jupyte…
ajduberstein Jan 2, 2020
29e66d6
pydeck: Correct PUBLISH.md typo (#4085)
ajduberstein Jan 2, 2020
0d91aa3
Fix inline versioning (#4086)
Pessimistress Jan 3, 2020
a8abe30
Update bundle config (#4088)
Pessimistress Jan 3, 2020
1134cad
pydeck: Add CDN-hosted bundle for standalone HTML rendering (#4003)
ajduberstein Jan 3, 2020
f2e6778
@deck.gl/jupyter-widget: Read version and module name from bundle for…
ajduberstein Jan 3, 2020
28d3c4f
update evaluate-children to pass deck gl view ports to children with …
georgios-uber Jan 3, 2020
5877187
Fix randomly failed icon layer render test (#4079)
Jan 3, 2020
69527d7
fix react key warning (#4098)
Pessimistress Jan 5, 2020
66c7505
pydeck: Simplify setup.py and add JupyterLab installation instruction…
ajduberstein Jan 5, 2020
4578dcb
Fix mapbox tile test app (#4097)
Pessimistress Jan 6, 2020
c482053
pydeck: Update documentation for 0.2.0 (#4102)
ajduberstein Jan 6, 2020
0bf267d
Add build-staging script to website (#4106)
Pessimistress Jan 7, 2020
44525a9
fix debug bundle warning (#4107)
Pessimistress Jan 7, 2020
4801d29
GPUGridAggregator: Add WA for ANGLE specific bug. (#4113)
1chandu Jan 8, 2020
76be6c1
fix cursor style in React (#4118)
Pessimistress Jan 8, 2020
5c8a156
pydeck: Reduce JupyterLab bundle size (#4110)
ajduberstein Jan 8, 2020
c0e3676
v8.1.0-alpha.0
Jan 8, 2020
813e1b4
[react] explicitly set deck canvas position (#4124)
Pessimistress Jan 9, 2020
15f69de
Fix support for luma.gl buffers as external attributes (#4121)
Pessimistress Jan 9, 2020
c66e3e5
Support initialViewState updates (#4038)
Pessimistress Jan 9, 2020
bd7467e
Minor documentation fixes (#4128)
Pessimistress Jan 10, 2020
c4aae05
Remove unused dependencies from geo-layers (#4127)
Pessimistress Jan 10, 2020
d73d931
Add interleaved buffer example (#4125)
Pessimistress Jan 10, 2020
437d6f7
Non-Geospatial TileLayer (#4117)
ilan-gold Jan 12, 2020
0cfbf2e
Bump loaders.gl (#4136)
Jan 12, 2020
5e0bc41
IconLayer: use load instead of loadImage to load icons (#4137)
Jan 13, 2020
853d972
Error handling (#4135)
Pessimistress Jan 13, 2020
94bad4b
Bump mjolnir.js dependency (#4141)
Pessimistress Jan 13, 2020
8a832f3
Reorg dev docs (#4142)
Pessimistress Jan 13, 2020
47548ee
Bump yarn.lcok (#4148)
Jan 14, 2020
0ead9dc
RFC: CPU Aggregation Refactor (#3845)
1chandu Jan 14, 2020
cb74907
Path layer vertex shader improvements (#4111)
Pessimistress Jan 15, 2020
b2a5ec9
IconLayer: fix copy texture data when resize (#4151)
Jan 15, 2020
417c6d6
Repeat maps at low zoom levels (#4105)
Pessimistress Jan 15, 2020
848420c
Project module: support pre-projected positions (#4140)
Pessimistress Jan 15, 2020
d004a38
Add offset feature to PathStyleExtension (#4126)
Pessimistress Jan 16, 2020
60b8edb
[Extension] Add source_target to brushing mode (#4150)
heshan0131 Jan 16, 2020
bca2822
Refactor render tests; use stricter pass criteria (#4157)
Pessimistress Jan 16, 2020
e7aef5d
Fix H3HexagonLayer update when viewport jumps (#4158)
Pessimistress Jan 16, 2020
95245f5
Remove unnecessary code from project glsl (#4162)
Pessimistress Jan 16, 2020
356655b
Voodoo fix for Mac+NVIDIA bug (#4166)
Pessimistress Jan 17, 2020
ff55172
v8.1.0-alpha.1
Jan 17, 2020
13c90fd
[TileLayer] fix tile indices generation in edge cases (#4170)
Pessimistress Jan 21, 2020
c64ad8c
Use int type for enum uniforms (#4171)
Pessimistress Jan 21, 2020
f5c0c19
data-filter: support double precision (#4163)
Pessimistress Jan 22, 2020
9a29a5e
Bump luma dependency (#4191)
Pessimistress Jan 23, 2020
9cc7d2a
Fix buffer size check in Attribute.updateBuffer (#4190)
Pessimistress Jan 23, 2020
aa6c40f
@deck.gl/json: Fix bug dropping props with falsy values (#4185)
ajduberstein Jan 23, 2020
f1311dc
Remove HtmlWebpackPlugin from examples/playground (#4178)
isaacbrodsky Jan 23, 2020
b513df6
[Bug] Fix hexagon layer projection (#4173)
heshan0131 Jan 24, 2020
6504586
[React] fix missing key error (#4193)
goszczynskip Jan 24, 2020
efbee1b
pydeck: ArcLayer, BitmapLayer, ColumnLayer examples (#4189)
ajduberstein Jan 25, 2020
b8d9df6
fix typo in performance.md
akre54 Jan 27, 2020
2f97c5e
Merge branch 'master' into tgorkin/data-filter-styletron
tgorkin Jan 28, 2020
497db21
Fix dependency versions.
tgorkin Jan 28, 2020
39b8397
Rename wrapper to root to follow React symatics.
tgorkin Jan 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
module.exports = {
plugins: ['react'],
extends: ['uber-jsx', 'uber-es2015', 'prettier', 'prettier/react', 'plugin:import/errors'],
overrides: {
overrides: [{
files: ['*.spec.js', 'webpack.config.js', '**/bundle/*.js'],
rules: {
'import/no-extraneous-dependencies': 0
}
},
}],
settings: {
'import/core-modules': [
'@luma.gl/core',
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: bindings/python/pydeck/docs/conf.py
configuration: bindings/pydeck/docs/conf.py

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: bindings/python/pydeck/requirements-dev.txt
- requirements: bindings/pydeck/requirements-dev.txt
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ matrix:
sources:
- ubuntu-toolchain-r-test
before_install:
- cd bindings/python/pydeck
- cd bindings/pydeck
python:
- "3.5"
- "2.7"
Expand All @@ -56,5 +56,5 @@ matrix:
- pip install -r requirements-dev.txt
- nvm install 10.16.0
- nvm use 10.16.0
- pip install -e . --install-option "--build_all"
- pip install -e . --install-option "--build_all" --verbose
script: pytest --cov=pydeck
39 changes: 37 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,44 @@ Each version should:
Ref: http://keepachangelog.com/en/0.3.0/
-->

## deck.gl v8.0
## deck.gl v8.1

### deck.gl [8.1.0-alpha.1] - Jan 17 2020

- Voodoo fix for Mac+NVIDIA bug (#4166)
- Remove unnecessary code from project glsl (#4162)
- Fix H3HexagonLayer update when viewport jumps (#4158)
- Refactor render tests; use stricter pass criteria (#4157)
- [Extension] Add source_target to brushing mode (#4150)
- Add offset feature to PathStyleExtension (#4126)
- Project module: support pre-projected positions (#4140)
- Repeat maps at low zoom levels (#4105)
- IconLayer: fix copy texture data when resize (#4151)
- Path layer vertex shader improvements (#4111)
- Bump mjolnir.js dependency (#4141)
- Error handling (#4135)
- IconLayer: use load instead of loadImage to load icons (#4137)
- Bump loaders.gl (#4136)
- Non-Geospatial TileLayer (#4117)
- Remove unused dependencies from geo-layers (#4127)
- Support initialViewState updates (#4038)
- Fix support for luma.gl buffers as external attributes (#4121)
- [react] explicitly set deck canvas position (#4124)

### deck.gl [8.1.0-alpha.0] - Jan 08 2020

- pydeck: Reduce JupyterLab bundle size (#4110)
- fix cursor style in React (#4118)
- GPUGridAggregator: Add WA for ANGLE specific bug. (#4113)
- fix debug bundle warning (#4107)
- pydeck: Simplify setup.py and add JupyterLab installation instructions (#4096)
- fix react key warning (#4098)
- Fix randomly failed icon layer render test (#4079)
- update evaluate-children to pass deck gl view ports to children with deckGLViewProps (#4092)
- clean up prop handling (#4080)
- Clean up hover handling (#4081)

### deck.gl v8.0 Prereleases
## deck.gl v8.0

### deck.gl [8.0.0-beta.2] - Dec 17 2019

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,4 @@ $RECYCLE.BIN/
# Cut JS files created in build process
**/pydeck/nbextension/static/index.js
**/pydeck/nbextension/static/index.js.map
**/pydeck/nbextension/static/extensionRequires.js
**/pydeck/io/templates/requirejs_dependencies.json
**/_build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019 Uber Technologies Inc.
Copyright (c) 2020 Uber Technologies Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
include LICENSE.txt
include README.md

include setupbase.py
include pytest.ini
include .coverage.rc
include .coveragerc

include pydeck/io/templates/*.j2

# Examples
graft examples
Expand Down
85 changes: 85 additions & 0 deletions bindings/pydeck/PUBLISH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
Publication checklist for pydeck
==========

Preferably run these commands in a virtual environment. Install pydeck from its source.
Build deck.gl from its source as well. If you're unsure how to do this, the README.md files for both.
This also assumes that you have pypi credentials to publish pydeck and NPM credentials to publish @deck.gl/juypter-widget.

1) Verify that there is a CDN-hosted release of @deck.gl/jupyter-widget for the standalone html template
within pydeck.

2) Verify that Deck object works on a fresh install from the source in the following
environments:

- `.show()` in a Jupyter Notebook
- `.to_html()` in a Jupyter Notebook
- `.show()` in Jupyter Lab
- `.to_html()` in Jupyter Lab
- `.to_html()` in a Python REPL

3) Bump the version number in `pydeck/_version.py`

4) Run the following commands to publish to the test.pypi environment:

```
rm -r ./dist/* # If exists, clear out the current dist folder
pip install -e . --verbose
python setup.py sdist bdist_wheel
pip install twine # If you have not installed twine
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```

5) In a fresh virtualenv, install pydeck from test.pypi:

```
pip install -i https://test.pypi.org/simple/ pydeck=={{version}}
```

where `{{version}}` is your semantic version.

6) Verify that pydeck works from test.pypi in the same environments as above.

7) If everything appears to be working, publish to pypi.

```
twine upload dist/*
```

8) Verify again the pydeck installed from the main pypi works in the environment above.

9) Inform the deck.gl Slack channel that a new version of pydeck has been published.


Updating documentation
==========

The pydeck documentation has three main components

- The .md files in the pydeck directory.
- The .rst files in the pydeck directory under `docs/`.
- The binder examples, which are kept on the `binder` branch of this repository.
- Most critically, the docstrings in the Python code itself, which combined with the .rst files generates
the documentation at https://deckgl.readthedocs.io/en/latest/.

### Updating the binder branch

Align the binder branch in-line with what's on master:

```
git checkout master
git pull
git checkout binder
git merge binder
git push
```

The Dockerfile at the root of the deck.gl repository can be tested locally with the following code:

```bash
docker build -t test-binder:latest .
docker run -p 8888:8888 test-binder:latest jupyter notebook --ip 0.0.0.0
```

This is what Binder will be executing when running the examples.

Verify the current examples work at https://mybinder.org/v2/gh/uber/deck.gl/binder?filepath=examples
40 changes: 22 additions & 18 deletions bindings/python/pydeck/README.md → bindings/pydeck/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,20 @@ For __interactive demos__, click the binder logo below:
pip install pydeck
```

If you are installing this for a Jupyter notebook server, you'll have to enable the widget extension.
To do this, run:
To install pydeck for Jupyter Notebook, run the following commands on your Jupyter server:

```bash
jupyter nbextension install --sys-prefix --symlink --overwrite --py pydeck
jupyter nbextension enable --sys-prefix --py pydeck
```

To install pydeck for JupyterLab, run the following:

```bash
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install @deck.gl/jupyter-widget
```

### Mapbox API token

Like deck.gl, the pydeck library takes its basemap tiles from [Mapbox](http://mapbox.com/). Register with Mapbox, and you can [find your Mapbox access token here](https://account.mapbox.com/access-tokens/). The service is free until a certain level of traffic is exceeded.
Expand All @@ -50,7 +56,7 @@ UK_ACCIDENTS_DATA = ('https://raw.githubusercontent.com/uber-common/'
layer = pdk.Layer(
'HexagonLayer',
UK_ACCIDENTS_DATA,
get_position='[lng, lat]',
get_position=['lng', 'lat'],
auto_highlight=True,
elevation_scale=50,
pickable=True,
Expand Down Expand Up @@ -100,7 +106,7 @@ and include your console output, if any.
git clone https://github.com/uber/deck.gl/

# Navigate to the pydeck module
cd deck.gl/bindings/python/pydeck
cd deck.gl/bindings/pydeck

# Create a virtual environment
python3 -m venv env3
Expand All @@ -111,26 +117,18 @@ python3 setup.py install

## Development

Build the deck.gl project at the root of this repository:

```bash
git clone https://github.com/uber/deck.gl/
cd deck.gl
# Build the entire deck.gl project
yarn bootstrap

# Optional but recommended: Run a hot reloading development server
cd modules/jupyter-widget
yarn watch
```

If running a non-default URL for webpack's dev server, change the URL in the `PYDECK_DEV_SERVER` environment variable,
e.g., `export PYDECK_DEV_SERVER=http://localhost:8081`.

Elsewhere, run:
From the directory of this README, build pydeck:

```bash
export PYDECK_DEV_SERVER=http://localhost:8080
cd deck.gl/bindings/python/pydeck

# Create a virtual environment
python3 -m venv env3
. env3/bin/activate
Expand All @@ -140,15 +138,21 @@ pip install -r requirements-dev.txt
pip install -e .
```

To enable develop with Jupyter Lab, run:
JupyterLab is the recommended environment for development testing with pydeck.
To develop with JupyterLab, run from this directory:

```bash
# Execute in deck.gl/modules/jupyter-widget directory
jupyter labextension install @jupyter-widgets/jupyterlab-manager@1.0.3 --no-build
# cd ../../modules/jupyter-widget
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
jupyter labextension install . --no-build
jupyter labextension link .
cd -
jupyter lab build
```

The `jupyter lab --watch` command can be used to provide hot reloading for development.


### Tests

Tests are handled by pytest. In the top-level pydeck directory, you can type:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
sys.path.insert(0, os.path.abspath('../'))

project = u'pydeck'
copyright = u'2019, Uber Technologies, Inc.'
copyright = u'2020, Uber Technologies, Inc.'
author = u'Andrew Duberstein'
# The short X.Y version
version = u''
Expand All @@ -32,7 +32,7 @@
]
texinfo_documents = [
(master_doc, 'pydeck', u'pydeck Documentation',
author, 'pydeck', 'One line description of project.',
author, 'pydeck', 'Python wrapper for deck.gl',
'Miscellaneous'),
]
epub_title = project
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Welcome to pydeck's documentation!
==================================

If you have not already, `follow the installation instructions <https://github.com/uber/deck.gl/blob/master/bindings/python/pydeck/README.md>`_
If you have not already, `follow the installation instructions <https://github.com/uber/deck.gl/blob/master/bindings/pydeck/README.md>`_

.. toctree::
:maxdepth: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ HexagonLayer <https://deck.gl/#/examples/core-layers/hexagon-layer>`__:
layer = pdk.Layer(
'HexagonLayer', # `type` positional argument is here
UK_ACCIDENTS_DATA,
get_position='[lng, lat]',
get_position=['lng', 'lat'],
auto_highlight=True,
elevation_scale=50,
pickable=True,
Expand Down Expand Up @@ -91,7 +91,7 @@ Try changing ``type`` above to ``ScatterplotLayer`` and add some
layer = pdk.Layer(
'ScatterplotLayer', # Change the `type` positional argument here
UK_ACCIDENTS_DATA,
get_position='[lng, lat]',
get_position=['lng', 'lat'],
auto_highlight=True,
get_radius=1000, # Radius is given in meters
get_fill_color=[180, 0, 200, 140], # Set an RGBA value for fill
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"point_cloud = pdk.Layer(\n",
" 'PointCloudLayer',\n",
" lidar[['x', 'y', 'z']],\n",
" get_position='[x, y, z * 10]',\n",
" get_position='@@=[x, y, z * 10]',\n",
" get_normal=[0, 0, 1],\n",
" get_color=[255, 0, 100, 200],\n",
" pickable=True, \n",
Expand Down Expand Up @@ -103,7 +103,7 @@
"while True:\n",
" current_frame = frame_buffer[0]\n",
" lidar = all_lidar[all_lidar['source'] == current_frame]\n",
" r.layers[0].get_position = '[x / 10000, y / 10000, z * 10]'\n",
" r.layers[0].get_position = '@@=[x / 10000, y / 10000, z * 10]'\n",
" r.layers[0].data = lidar.to_dict(orient='records')\n",
" frame_buffer.rotate()\n",
" r.update()\n",
Expand Down
Loading