From c3084ad7f7d08cd151fa952d33cca0cc66469f48 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Thu, 11 Apr 2024 16:37:33 -0400 Subject: [PATCH 1/3] chore(pydeck-carto): Fix missing global for pydeck-carto in 8.9 release --- modules/carto/bundle.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/carto/bundle.ts b/modules/carto/bundle.ts index 6f649d0228b..76fdb2508b8 100644 --- a/modules/carto/bundle.ts +++ b/modules/carto/bundle.ts @@ -3,3 +3,7 @@ import * as CartoUtils from './src'; export * from '../layers/bundle/peer-dependency'; export const carto = CartoUtils; + +// Export carto layer library for pydeck integration +// More info: https://github.com/ajduberstein/pydeck_custom_layer +globalThis.CartoLayerLibrary = CartoUtils; From 167e7e39651b5f79a3e0250b05f486e23513eda4 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Thu, 11 Apr 2024 17:12:09 -0400 Subject: [PATCH 2/3] Port known fixes --- bindings/pydeck/pydeck/io/html.py | 3 ++- bindings/pydeck/requirements/requirements-dev.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/pydeck/pydeck/io/html.py b/bindings/pydeck/pydeck/io/html.py index 0e98387f883..8157b5d394a 100644 --- a/bindings/pydeck/pydeck/io/html.py +++ b/bindings/pydeck/pydeck/io/html.py @@ -21,7 +21,8 @@ def in_jupyter(): def convert_js_bool(py_bool): - if type(py_bool) is bool: + """Serializes Python booleans to JavaScript. Returns non-boolean values unchanged.""" + if type(py_bool) is not bool: return py_bool return "true" if py_bool else "false" diff --git a/bindings/pydeck/requirements/requirements-dev.txt b/bindings/pydeck/requirements/requirements-dev.txt index 91e316123b7..194e1abaf74 100644 --- a/bindings/pydeck/requirements/requirements-dev.txt +++ b/bindings/pydeck/requirements/requirements-dev.txt @@ -11,7 +11,7 @@ flake8 requests sphinx recommonmark -jupyterlab +jupyterlab<4.0.0 ipython>=5.8.0;python_version<"3.4" semver # necessary for PEP440-compliant semantic versions sphinx-markdown-builder From 03dc64d67e390ef09553bb3041c29db62dcea97e Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Mon, 15 Apr 2024 12:00:30 -0400 Subject: [PATCH 3/3] Bump pydeck's deckgl semver range --- bindings/pydeck-carto/pydeck_carto/layer.py | 2 +- bindings/pydeck/pydeck/frontend_semver.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/pydeck-carto/pydeck_carto/layer.py b/bindings/pydeck-carto/pydeck_carto/layer.py index 40437d48f43..eb2622a9c00 100644 --- a/bindings/pydeck-carto/pydeck_carto/layer.py +++ b/bindings/pydeck-carto/pydeck_carto/layer.py @@ -1,7 +1,7 @@ import pydeck as pdk H3_VERSION = "~3.7.*" -DECKGL_VERSION = "~8.8.*" +DECKGL_VERSION = "~8.9.*" LIBRARIES_TO_INCLUDE = [ f"npm/h3-js@{H3_VERSION}/dist/h3-js.umd.js", diff --git a/bindings/pydeck/pydeck/frontend_semver.py b/bindings/pydeck/pydeck/frontend_semver.py index 8d9c8cc7f49..576afb69826 100644 --- a/bindings/pydeck/pydeck/frontend_semver.py +++ b/bindings/pydeck/pydeck/frontend_semver.py @@ -1 +1 @@ -DECKGL_SEMVER = "~8.8.*" +DECKGL_SEMVER = "~8.9.*"