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

Update of deck-gl versions to 8.9.34 with fixed CI and drop EOL Python 3.6 and 3.7 #22

Merged
merged 23 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c123e3c
bump of all versions to around 8.7.0
vogt31337 Nov 22, 2023
5dfa6da
upgrade of versions was somewhat succesfull, but map loading broken.
vogt31337 Nov 23, 2023
f97da2d
next update, now webpack doesn't chunk anymore, which is problematic …
vogt31337 Nov 23, 2023
22c3fbc
now mapbox is working again!
vogt31337 Nov 23, 2023
1e2577b
Fallback to maplibre implemented.
vogt31337 Nov 23, 2023
70d83ce
Merge branch 'master' of github.com:plotly/dash-deck into vogt31337/m…
graingert-coef Feb 7, 2024
8ddbd1e
fix eslint
graingert-coef Jan 30, 2024
ac01fec
use the new pydeck api for passing the mapbox api key
graingert-coef Jan 30, 2024
e54afc0
run black
graingert-coef Jan 30, 2024
792a8a9
drop support for 3.6 and support for 3.8
graingert-coef Jan 30, 2024
3ebdccc
run black 24
graingert-coef Jan 30, 2024
5c188c4
restore build:py_and_r linux support
graingert-coef Jan 30, 2024
175bb05
npm run build
graingert-coef Jan 30, 2024
d8ebf88
upgrade to deck.gl 8.9.34
graingert-coef Jan 30, 2024
fe8edc4
npm run build
graingert-coef Jan 30, 2024
36dc6a5
test on more python versions
graingert-coef Jan 30, 2024
15d5563
drop support for 3.6 in setup.py
graingert-coef Jan 31, 2024
51b2f76
Revert "pin to an even older version of black for 3.6"
graingert-coef Jan 31, 2024
67f1be8
drop python 3.7
graingert-coef Jan 31, 2024
d214540
delete R and man directory and rebuild
graingert-coef Feb 13, 2024
18edd8a
include circleci config in venv cache key
graingert-coef Feb 13, 2024
f06de4a
Merge branch 'fix-ci-again' into vogt31337/master
graingert-coef Feb 13, 2024
88c50c0
Update tests/requirements.txt
alexcjohnson Feb 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 45 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ orbs:
jobs:
"node":
docker:
- image: cimg/python:3.7-node
- image: cimg/python:3.12-node
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
Expand All @@ -14,7 +14,7 @@ jobs:
- checkout

- restore_cache:
key: deps1-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum "tests/requirements.txt" }}-{{ checksum "demos/requirements.txt" }}-{{ checksum "requirements.txt" }}
key: deps1-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "package.json" }}-{{ checksum "tests/requirements.txt" }}-{{ checksum "demos/requirements.txt" }}-{{ checksum "requirements.txt" }}

- run:
name: Create virtualenv
Expand All @@ -35,7 +35,7 @@ jobs:
npm i

- save_cache:
key: deps1-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum "tests/requirements.txt" }}-{{ checksum "demos/requirements.txt" }}-{{ checksum "requirements.txt" }}
key: deps1-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "package.json" }}-{{ checksum "tests/requirements.txt" }}-{{ checksum "demos/requirements.txt" }}-{{ checksum "requirements.txt" }}
paths:
- node_modules

Expand All @@ -45,9 +45,9 @@ jobs:
when: always


"python-3-6": &test-template
"python-3-8": &test-template
docker:
- image: cimg/python:3.6-browsers
- image: cimg/python:3.8-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
Expand Down Expand Up @@ -108,10 +108,40 @@ jobs:
path: /tmp/dash_artifacts
destination: snapshots

"python-3-7":
"python-3-9":
<<: *test-template
docker:
- image: cimg/python:3.7-browsers
- image: cimg/python:3.9-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PERCY_ENABLE: False

"python-3-10":
<<: *test-template
docker:
- image: cimg/python:3.10-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PERCY_ENABLE: False

"python-3-11":
<<: *test-template
docker:
- image: cimg/python:3.11-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PERCY_ENABLE: False

"python-3-12":
<<: *test-template
docker:
- image: cimg/python:3.12-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
Expand All @@ -123,9 +153,15 @@ workflows:
version: 2
build:
jobs:
- "python-3-6":
- "python-3-8":
context: dash-docker-hub
- "python-3-9":
context: dash-docker-hub
- "python-3-10":
context: dash-docker-hub
- "python-3-11":
context: dash-docker-hub
- "python-3-7":
- "python-3-12":
context: dash-docker-hub
- "node":
context: dash-docker-hub
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"extends": ["eslint:recommended", "prettier"],
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"requireConfigFile": false,
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dashDeck
Title: A Dash Component wrapping deck.gl
Version: 0.0.1
Version: 0.0.2
Description: A Dash Component wrapping deck.gl
Depends: R (>= 3.0.2)
Imports:
Expand Down
7 changes: 4 additions & 3 deletions R/deckGL.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# AUTO GENERATED FILE - DO NOT EDIT

deckGL <- function(data=NULL, id=NULL, style=NULL, enableEvents=NULL, tooltip=NULL, mapboxKey=NULL, disableContext=NULL, clickEvent=NULL, clickInfo=NULL, hoverEvent=NULL, hoverInfo=NULL, dragStartEvent=NULL, dragStartInfo=NULL, dragEndEvent=NULL, dragEndInfo=NULL) {
#' @export
deckGL <- function(id=NULL, clickEvent=NULL, clickInfo=NULL, data=NULL, disableContext=NULL, dragEndEvent=NULL, dragEndInfo=NULL, dragStartEvent=NULL, dragStartInfo=NULL, enableEvents=NULL, hoverEvent=NULL, hoverInfo=NULL, mapboxKey=NULL, style=NULL, tooltip=NULL) {

props <- list(data=data, id=id, style=style, enableEvents=enableEvents, tooltip=tooltip, mapboxKey=mapboxKey, disableContext=disableContext, clickEvent=clickEvent, clickInfo=clickInfo, hoverEvent=hoverEvent, hoverInfo=hoverInfo, dragStartEvent=dragStartEvent, dragStartInfo=dragStartInfo, dragEndEvent=dragEndEvent, dragEndInfo=dragEndInfo)
props <- list(id=id, clickEvent=clickEvent, clickInfo=clickInfo, data=data, disableContext=disableContext, dragEndEvent=dragEndEvent, dragEndInfo=dragEndInfo, dragStartEvent=dragStartEvent, dragStartInfo=dragStartInfo, enableEvents=enableEvents, hoverEvent=hoverEvent, hoverInfo=hoverInfo, mapboxKey=mapboxKey, style=style, tooltip=tooltip)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'DeckGL',
namespace = 'dash_deck',
propNames = c('data', 'id', 'style', 'enableEvents', 'tooltip', 'mapboxKey', 'disableContext', 'clickEvent', 'clickInfo', 'hoverEvent', 'hoverInfo', 'dragStartEvent', 'dragStartInfo', 'dragEndEvent', 'dragEndInfo'),
propNames = c('id', 'clickEvent', 'clickInfo', 'data', 'disableContext', 'dragEndEvent', 'dragEndInfo', 'dragStartEvent', 'dragStartInfo', 'enableEvents', 'hoverEvent', 'hoverInfo', 'mapboxKey', 'style', 'tooltip'),
package = 'dashDeck'
)

Expand Down
4 changes: 2 additions & 2 deletions R/internal.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.dashDeck_js_metadata <- function() {
deps_metadata <- list(`dash_deck` = structure(list(name = "dash_deck",
version = "0.0.1", src = list(href = NULL,
version = "0.0.2", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'dash_deck.min.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashDeck",
all_files = FALSE), class = "html_dependency"),
`dash_deck` = structure(list(name = "dash_deck",
version = "0.0.1", src = list(href = NULL,
version = "0.0.2", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'dash_deck.min.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashDeck",
Expand Down
162 changes: 103 additions & 59 deletions dash_deck/DeckGL.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,114 @@ class DeckGL(Component):
hover and drag) inside callbacks.

Keyword arguments:
- data (dict | string; optional): Your map using the Deck.gl JSON format. This can be generated by calling
`pdk.Deck(...).to_json()`. Both a Python dictionary and a JSON-string your map is accepted.
- id (string; optional): The ID used to identify this component in Dash callbacks.
- style (dict; optional): Custom CSS for your map. This is useful for changing the height, width, and sometimes the background color.
- enableEvents (list of strings | boolean; default False): Either a boolean indicating if all event callbacks should be enabled, or a list of strings
indicating which ones should be used. If it's a list, you will need to specify one of the
following gestures: `click`, `dragStart`, `dragEnd`, `hover`.
- tooltip (dict | boolean; default False): This can be a boolean value (e.g. `True`, `False`) to display the default tooltip.
You can also give a dictionary specifying an `html` template and custom style using `css`. For more
information about templating, see: https://pydeck.gl/tooltip.html
- mapboxKey (string; optional): You will need a mapbox token to use deck.gl. Please create a mapbox
and follow the instructions here: https://docs.mapbox.com/help/how-mapbox-works/access-tokens/
- disableContext (boolean; default False): This is a boolean value (e.g. `True`, `False`) indicating whether or not to disable the default context menu
that shows up when right clicking on the map. If set to `True`, right clicking to rotate
a map or adjust its pitch will not trigger the default context menu.
- clickEvent (dict; optional): Read-only prop. To use this, make sure that `enableEvents` is set to `True`, or that `enableEvents` is a list that contains this event type.
This prop is updated when an element in the map is clicked. This contains
the original gesture event (in JSON).
- clickInfo (dict; optional): Read-only prop. To use this, make sure that `enableEvents` is set to `True`, or that `enableEvents` is a list that contains this event type.
This prop is updated when an element in the map is clicked. This contains
the picking info describing the object being clicked.
Complete description here:
https://deck.gl/docs/developer-guide/interactivity#the-picking-info-object
- hoverEvent (dict; optional): Read-only prop. To use this, make sure that `enableEvents` is set to `True`, or that `enableEvents` is a list that contains this event type.
This prop is updated when an element in the map is hovered. This contains
the original gesture event (in JSON).
- hoverInfo (dict; optional): Read-only prop. To use this, make sure that `enableEvents` is set to `True`, or that `enableEvents` is a list that contains this event type.
This prop is updated when an element in the map is hovered. This contains
the picking info describing the object being hovered.
Complete description here:
https://deck.gl/docs/developer-guide/interactivity#the-picking-info-object
- dragStartEvent (dict; optional): Read-only prop. To use this, make sure that `enableEvents` is set to `True`, or that `enableEvents` is a list that contains this event type.
To use this, make sure that `enableEvents` is set to `True`, or that `enableEvents` is a list that contains this event type.
This prop is updated when the user starts dragging on the canvas. This contains
the original gesture event (in JSON).
- dragStartInfo (dict; optional): Read-only prop. To use this, make sure that `enableEvents` is set to `True`, or that `enableEvents` is a list that contains this event type.
This prop is updated when the user starts dragging on the canvas. This contains
the picking info describing the object being dragged.
Complete description here:
https://deck.gl/docs/developer-guide/interactivity#the-picking-info-object
- dragEndEvent (dict; optional): Read-only prop. To use this, make sure that `enableEvents` is set to `True`, or that `enableEvents` is a list that contains this event type.
This prop is updated when the user releases from dragging the canvas. This contains
the original gesture event (in JSON).
- dragEndInfo (dict; optional): Read-only prop. To use this, make sure that `enableEvents` is set to `True`, or that `enableEvents` is a list that contains this event type.
This prop is updated when the user releases from dragging the canvas. This contains
the picking info describing the object being dragged.
Complete description here:
https://deck.gl/docs/developer-guide/interactivity#the-picking-info-object"""

- id (string; optional):
The ID used to identify this component in Dash callbacks.

- clickEvent (dict; optional):
Read-only prop. To use this, make sure that `enableEvents` is set
to `True`, or that `enableEvents` is a list that contains this
event type. This prop is updated when an element in the map is
clicked. This contains the original gesture event (in JSON).

- clickInfo (dict; optional):
Read-only prop. To use this, make sure that `enableEvents` is set
to `True`, or that `enableEvents` is a list that contains this
event type. This prop is updated when an element in the map is
clicked. This contains the picking info describing the object
being clicked. Complete description here:
https://deck.gl/docs/developer-guide/interactivity#the-picking-info-object.

- data (dict | string; optional):
Your map using the Deck.gl JSON format. This can be generated by
calling `pdk.Deck(...).to_json()`. Both a Python dictionary and a
JSON-string your map is accepted.

- disableContext (boolean; default False):
This is a boolean value (e.g. `True`, `False`) indicating whether
or not to disable the default context menu that shows up when
right clicking on the map. If set to `True`, right clicking to
rotate a map or adjust its pitch will not trigger the default
context menu.

- dragEndEvent (dict; optional):
Read-only prop. To use this, make sure that `enableEvents` is set
to `True`, or that `enableEvents` is a list that contains this
event type. This prop is updated when the user releases from
dragging the canvas. This contains the original gesture event (in
JSON).

- dragEndInfo (dict; optional):
Read-only prop. To use this, make sure that `enableEvents` is set
to `True`, or that `enableEvents` is a list that contains this
event type. This prop is updated when the user releases from
dragging the canvas. This contains the picking info describing the
object being dragged. Complete description here:
https://deck.gl/docs/developer-guide/interactivity#the-picking-info-object.

- dragStartEvent (dict; optional):
Read-only prop. To use this, make sure that `enableEvents` is set
to `True`, or that `enableEvents` is a list that contains this
event type. To use this, make sure that `enableEvents` is set to
`True`, or that `enableEvents` is a list that contains this event
type. This prop is updated when the user starts dragging on the
canvas. This contains the original gesture event (in JSON).

- dragStartInfo (dict; optional):
Read-only prop. To use this, make sure that `enableEvents` is set
to `True`, or that `enableEvents` is a list that contains this
event type. This prop is updated when the user starts dragging on
the canvas. This contains the picking info describing the object
being dragged. Complete description here:
https://deck.gl/docs/developer-guide/interactivity#the-picking-info-object.

- enableEvents (list of strings | boolean; default False):
Either a boolean indicating if all event callbacks should be
enabled, or a list of strings indicating which ones should be
used. If it's a list, you will need to specify one of the
following gestures: `click`, `dragStart`, `dragEnd`, `hover`.

- hoverEvent (dict; optional):
Read-only prop. To use this, make sure that `enableEvents` is set
to `True`, or that `enableEvents` is a list that contains this
event type. This prop is updated when an element in the map is
hovered. This contains the original gesture event (in JSON).

- hoverInfo (dict; optional):
Read-only prop. To use this, make sure that `enableEvents` is set
to `True`, or that `enableEvents` is a list that contains this
event type. This prop is updated when an element in the map is
hovered. This contains the picking info describing the object
being hovered. Complete description here:
https://deck.gl/docs/developer-guide/interactivity#the-picking-info-object.

- mapboxKey (string; optional):
You will need a mapbox token to use deck.gl. Please create a
mapbox and follow the instructions here:
https://docs.mapbox.com/help/how-mapbox-works/access-tokens/.

- style (dict; optional):
Custom CSS for your map. This is useful for changing the height,
width, and sometimes the background color.

- tooltip (dict | boolean; default False):
This can be a boolean value (e.g. `True`, `False`) to display the
default tooltip. You can also give a dictionary specifying an
`html` template and custom style using `css`. For more information
about templating, see: https://pydeck.gl/tooltip.html."""
_children_props = []
_base_nodes = ['children']
_namespace = 'dash_deck'
_type = 'DeckGL'
@_explicitize_args
def __init__(self, data=Component.UNDEFINED, id=Component.UNDEFINED, style=Component.UNDEFINED, enableEvents=Component.UNDEFINED, tooltip=Component.UNDEFINED, mapboxKey=Component.UNDEFINED, disableContext=Component.UNDEFINED, clickEvent=Component.UNDEFINED, clickInfo=Component.UNDEFINED, hoverEvent=Component.UNDEFINED, hoverInfo=Component.UNDEFINED, dragStartEvent=Component.UNDEFINED, dragStartInfo=Component.UNDEFINED, dragEndEvent=Component.UNDEFINED, dragEndInfo=Component.UNDEFINED, **kwargs):
self._prop_names = ['data', 'id', 'style', 'enableEvents', 'tooltip', 'mapboxKey', 'disableContext', 'clickEvent', 'clickInfo', 'hoverEvent', 'hoverInfo', 'dragStartEvent', 'dragStartInfo', 'dragEndEvent', 'dragEndInfo']
self._type = 'DeckGL'
self._namespace = 'dash_deck'
self._prop_names = ['id', 'clickEvent', 'clickInfo', 'data', 'disableContext', 'dragEndEvent', 'dragEndInfo', 'dragStartEvent', 'dragStartInfo', 'enableEvents', 'hoverEvent', 'hoverInfo', 'mapboxKey', 'style', 'tooltip']
self._valid_wildcard_attributes = []
self.available_properties = ['data', 'id', 'style', 'enableEvents', 'tooltip', 'mapboxKey', 'disableContext', 'clickEvent', 'clickInfo', 'hoverEvent', 'hoverInfo', 'dragStartEvent', 'dragStartInfo', 'dragEndEvent', 'dragEndInfo']
self.available_properties = ['id', 'clickEvent', 'clickInfo', 'data', 'disableContext', 'dragEndEvent', 'dragEndInfo', 'dragStartEvent', 'dragStartInfo', 'enableEvents', 'hoverEvent', 'hoverInfo', 'mapboxKey', 'style', 'tooltip']
self.available_wildcard_properties = []

_explicit_args = kwargs.pop('_explicit_args')
_locals = locals()
_locals.update(kwargs) # For wildcard attrs
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
_locals.update(kwargs) # For wildcard attrs and excess named props
args = {k: _locals[k] for k in _explicit_args}

for k in []:
if k not in args:
raise TypeError(
'Required argument `' + k + '` was not specified.')
super(DeckGL, self).__init__(**args)
20 changes: 2 additions & 18 deletions dash_deck/dash_deck.min.js

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions dash_deck/dash_deck.min.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* @license
Papa Parse
v5.0.0-beta.0
https://github.com/mholt/PapaParse
License: MIT
*/

/*! Hammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
* @license
* Copyright 2009 The Closure Library Authors
* Copyright 2020 Daniel Wirtz / The long.js Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/

/**
* @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
* Released under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/long.js for details
*/
2 changes: 1 addition & 1 deletion dash_deck/dash_deck.min.js.map

Large diffs are not rendered by default.