From 863e06fe8db88f07475d0d3632f464d6e1fe89cb Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Wed, 30 Jun 2021 17:09:38 -0700 Subject: [PATCH 1/9] support panel and bokeh latest versions --- .../custom_extensions/graph_inspect_widget.py | 8 ++--- .../layouts/custom_react_template.py | 30 +++++-------------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/python/cuxfilter/charts/datashader/custom_extensions/graph_inspect_widget.py b/python/cuxfilter/charts/datashader/custom_extensions/graph_inspect_widget.py index 7aa64915..c9ac8970 100644 --- a/python/cuxfilter/charts/datashader/custom_extensions/graph_inspect_widget.py +++ b/python/cuxfilter/charts/datashader/custom_extensions/graph_inspect_widget.py @@ -1,4 +1,4 @@ -from bokeh.core.properties import Image, Bool, String +from bokeh.core.properties import Image, Bool, String, Nullable from bokeh.models import Tool from bokeh.util.compiler import TypeScript @@ -13,7 +13,7 @@ super.connect_signals() this.connect(this.model.properties.active.change, () => { - this.model._active = this.model.properties.active.spec.value + this.model._active = this.model.active }) } } @@ -53,6 +53,6 @@ class CustomInspectTool(Tool): __implementation__ = TypeScript(TS_CODE) - _active = Bool + _active = Nullable(Bool) icon = Image() - tool_name = String + tool_name = String() diff --git a/python/cuxfilter/layouts/custom_react_template.py b/python/cuxfilter/layouts/custom_react_template.py index 2e971d5c..dbaa803a 100644 --- a/python/cuxfilter/layouts/custom_react_template.py +++ b/python/cuxfilter/layouts/custom_react_template.py @@ -1,9 +1,5 @@ -from urllib.parse import urljoin +from panel import depends import param -from panel.io.resources import LOCAL_DIST -from panel.io.state import state -from panel.util import url_path -from panel.depends import depends from panel.layout import Card, GridSpec from panel.template.base import BasicTemplate import os @@ -70,30 +66,18 @@ class ReactTemplate(BasicTemplate): } def _template_resources(self): - name = type(self).__name__.lower() - base_url = state.base_url - if state.base_url.startswith("/"): - base_url = state.base_url[1:] - dist_path = urljoin(base_url, LOCAL_DIST) - # External resources - css_files = dict(self._resources["css"]) - for cssname, css in css_files.items(): - css_path = url_path(css) - css_files[cssname] = dist_path + f"bundled/{name}/{css_path}" - js_files = dict(self._resources["js"]) - for jsname, js in js_files.items(): - js_path = url_path(js) - js_files[jsname] = dist_path + f"bundled/{name}/{js_path}" - + resources = super()._template_resources() # CSS files base_css = os.path.basename(self._css) - css_files["base"] = f"{CUSTOM_DIST_PATH_LAYOUTS}/{base_css}" + resources["css"]["base"] = f"{CUSTOM_DIST_PATH_LAYOUTS}/{base_css}" if self.theme: theme = self.theme.find_theme(type(self)) if theme and theme.css: basename = os.path.basename(theme.css) - css_files["theme"] = f"{CUSTOM_DIST_PATH_THEMES}/{basename}" - return {"css": css_files, "js": js_files} + resources["css"]["theme"] = ( + f"{CUSTOM_DIST_PATH_THEMES}/{basename}" + ) + return resources def __init__(self, **params): if "main" not in params: From 24727d0560d3e76f3c490362ce29614623c6062c Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Wed, 30 Jun 2021 17:20:20 -0700 Subject: [PATCH 2/9] update bokeh versions --- ci/gpu/build.sh | 2 +- conda/environments/cuxfilter_dev_cuda10.1.yml | 2 +- conda/environments/cuxfilter_dev_cuda10.2.yml | 2 +- conda/environments/cuxfilter_dev_cuda11.0.yml | 2 +- conda/recipes/cuxfilter/meta.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 70bafeb5..e3fd79c2 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -59,7 +59,7 @@ gpuci_conda_retry install -y \ "cuspatial=$MINOR_VERSION.*" \ "dask-cudf=$MINOR_VERSION.*" "dask-cuda=$MINOR_VERSION.*" \ "numba>=0.51.2" \ - "bokeh<=2.2.3" \ + "bokeh>=2.3.*,<2.4.*" \ "rapids-build-env=$MINOR_VERSION.*" \ "rapids-notebook-env=$MINOR_VERSION.*" diff --git a/conda/environments/cuxfilter_dev_cuda10.1.yml b/conda/environments/cuxfilter_dev_cuda10.1.yml index ce0440e0..ff03f1d4 100644 --- a/conda/environments/cuxfilter_dev_cuda10.1.yml +++ b/conda/environments/cuxfilter_dev_cuda10.1.yml @@ -20,7 +20,7 @@ dependencies: - pyproj>=2.4, <=3.1 - libwebp - pandoc=<2.0.0 -- bokeh>=2.1.1,<=2.2.3 +- bokeh>=2.3.*,<2.4.* - panel>=0.10.3 - cudatoolkit=10.1 - nodejs diff --git a/conda/environments/cuxfilter_dev_cuda10.2.yml b/conda/environments/cuxfilter_dev_cuda10.2.yml index 55dc2409..6848ef1e 100644 --- a/conda/environments/cuxfilter_dev_cuda10.2.yml +++ b/conda/environments/cuxfilter_dev_cuda10.2.yml @@ -21,7 +21,7 @@ dependencies: - pyproj>=2.4, <=3.1 - libwebp - pandoc=<2.0.0 -- bokeh>=2.1.1,<=2.2.3 +- bokeh>=2.3.*,<2.4.* - panel>=0.10.3 - cudatoolkit=10.2 - nodejs diff --git a/conda/environments/cuxfilter_dev_cuda11.0.yml b/conda/environments/cuxfilter_dev_cuda11.0.yml index f9b29871..321aa21a 100644 --- a/conda/environments/cuxfilter_dev_cuda11.0.yml +++ b/conda/environments/cuxfilter_dev_cuda11.0.yml @@ -20,7 +20,7 @@ dependencies: - pyproj>=2.4, <=3.1 - libwebp - pandoc=<2.0.0 -- bokeh>=2.1.1,<=2.2.3 +- bokeh>=2.3.*,<2.4.* - panel>=0.10.3 - cudatoolkit=11.0 - nodejs diff --git a/conda/recipes/cuxfilter/meta.yaml b/conda/recipes/cuxfilter/meta.yaml index ce0bef31..cfb8896d 100644 --- a/conda/recipes/cuxfilter/meta.yaml +++ b/conda/recipes/cuxfilter/meta.yaml @@ -35,7 +35,7 @@ requirements: - numba >=0.51.2 - cupy >=7.8.0,<10.0.0a0 - panel >=0.10.3 - - bokeh >=2.1.1,<=2.2.3 + - bokeh >=2.3.*,<2.4.* - pyproj >=2.4, <=3.1 - geopandas >=0.9.0,<0.10.0a0 - nodejs >=12,<15 From a525e698b6a2019025cbc4b6721920fc323e6c76 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Wed, 30 Jun 2021 17:25:45 -0700 Subject: [PATCH 3/9] black based formating --- python/cuxfilter/layouts/custom_react_template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/cuxfilter/layouts/custom_react_template.py b/python/cuxfilter/layouts/custom_react_template.py index dbaa803a..57d1c87c 100644 --- a/python/cuxfilter/layouts/custom_react_template.py +++ b/python/cuxfilter/layouts/custom_react_template.py @@ -74,9 +74,9 @@ def _template_resources(self): theme = self.theme.find_theme(type(self)) if theme and theme.css: basename = os.path.basename(theme.css) - resources["css"]["theme"] = ( - f"{CUSTOM_DIST_PATH_THEMES}/{basename}" - ) + resources["css"][ + "theme" + ] = f"{CUSTOM_DIST_PATH_THEMES}/{basename}" return resources def __init__(self, **params): From 17db303f4db0e698f98a02ad910f24aa0873cf35 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Thu, 1 Jul 2021 09:44:42 -0700 Subject: [PATCH 4/9] remove * in bokeh version --- ci/gpu/build.sh | 2 +- conda/environments/cuxfilter_dev_cuda10.1.yml | 2 +- conda/environments/cuxfilter_dev_cuda10.2.yml | 2 +- conda/environments/cuxfilter_dev_cuda11.0.yml | 2 +- conda/recipes/cuxfilter/meta.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index e3fd79c2..03d776e7 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -59,7 +59,7 @@ gpuci_conda_retry install -y \ "cuspatial=$MINOR_VERSION.*" \ "dask-cudf=$MINOR_VERSION.*" "dask-cuda=$MINOR_VERSION.*" \ "numba>=0.51.2" \ - "bokeh>=2.3.*,<2.4.*" \ + "bokeh>=2.3.2,<2.4" \ "rapids-build-env=$MINOR_VERSION.*" \ "rapids-notebook-env=$MINOR_VERSION.*" diff --git a/conda/environments/cuxfilter_dev_cuda10.1.yml b/conda/environments/cuxfilter_dev_cuda10.1.yml index ff03f1d4..a8f48e2f 100644 --- a/conda/environments/cuxfilter_dev_cuda10.1.yml +++ b/conda/environments/cuxfilter_dev_cuda10.1.yml @@ -20,7 +20,7 @@ dependencies: - pyproj>=2.4, <=3.1 - libwebp - pandoc=<2.0.0 -- bokeh>=2.3.*,<2.4.* +- bokeh>=2.3.2,<2.4 - panel>=0.10.3 - cudatoolkit=10.1 - nodejs diff --git a/conda/environments/cuxfilter_dev_cuda10.2.yml b/conda/environments/cuxfilter_dev_cuda10.2.yml index 6848ef1e..d2bc8bfd 100644 --- a/conda/environments/cuxfilter_dev_cuda10.2.yml +++ b/conda/environments/cuxfilter_dev_cuda10.2.yml @@ -21,7 +21,7 @@ dependencies: - pyproj>=2.4, <=3.1 - libwebp - pandoc=<2.0.0 -- bokeh>=2.3.*,<2.4.* +- bokeh>=2.3.2,<2.4 - panel>=0.10.3 - cudatoolkit=10.2 - nodejs diff --git a/conda/environments/cuxfilter_dev_cuda11.0.yml b/conda/environments/cuxfilter_dev_cuda11.0.yml index 321aa21a..54987e35 100644 --- a/conda/environments/cuxfilter_dev_cuda11.0.yml +++ b/conda/environments/cuxfilter_dev_cuda11.0.yml @@ -20,7 +20,7 @@ dependencies: - pyproj>=2.4, <=3.1 - libwebp - pandoc=<2.0.0 -- bokeh>=2.3.*,<2.4.* +- bokeh>=2.3.2,<2.4 - panel>=0.10.3 - cudatoolkit=11.0 - nodejs diff --git a/conda/recipes/cuxfilter/meta.yaml b/conda/recipes/cuxfilter/meta.yaml index cfb8896d..ea637a1d 100644 --- a/conda/recipes/cuxfilter/meta.yaml +++ b/conda/recipes/cuxfilter/meta.yaml @@ -35,7 +35,7 @@ requirements: - numba >=0.51.2 - cupy >=7.8.0,<10.0.0a0 - panel >=0.10.3 - - bokeh >=2.3.*,<2.4.* + - bokeh >=2.3.2,<2.4 - pyproj >=2.4, <=3.1 - geopandas >=0.9.0,<0.10.0a0 - nodejs >=12,<15 From 44bde16f4bf9adf93e039acaa5df5c7b1df92821 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Fri, 2 Jul 2021 13:02:23 -0700 Subject: [PATCH 5/9] temporary patch to check bokeh version compatibility --- ci/gpu/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 03d776e7..854cd090 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -59,13 +59,13 @@ gpuci_conda_retry install -y \ "cuspatial=$MINOR_VERSION.*" \ "dask-cudf=$MINOR_VERSION.*" "dask-cuda=$MINOR_VERSION.*" \ "numba>=0.51.2" \ - "bokeh>=2.3.2,<2.4" \ + "bokeh<=2.2.3" \ "rapids-build-env=$MINOR_VERSION.*" \ "rapids-notebook-env=$MINOR_VERSION.*" # https://docs.rapids.ai/maintainers/depmgmt/ -# conda remove -f rapids-build-env rapids-notebook-env -# conda install "your-pkg=1.0.0" +conda remove -f rapids-build-env rapids-notebook-env +conda install "bokeh>=2.3.2, <2.4" gpuci_logger "Check versions" python --version From 21a6679fbd1d2e67aec6dd2e3e4fab6f8ae136bf Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Fri, 2 Jul 2021 14:27:09 -0700 Subject: [PATCH 6/9] patch fix --- ci/gpu/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 854cd090..fe8eae75 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -59,7 +59,6 @@ gpuci_conda_retry install -y \ "cuspatial=$MINOR_VERSION.*" \ "dask-cudf=$MINOR_VERSION.*" "dask-cuda=$MINOR_VERSION.*" \ "numba>=0.51.2" \ - "bokeh<=2.2.3" \ "rapids-build-env=$MINOR_VERSION.*" \ "rapids-notebook-env=$MINOR_VERSION.*" From 8c4116573710892856ad766bf0ed54da307f2c27 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 6 Jul 2021 08:57:33 -0700 Subject: [PATCH 7/9] update force flag --- ci/gpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index fe8eae75..5b07cec3 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -63,7 +63,7 @@ gpuci_conda_retry install -y \ "rapids-notebook-env=$MINOR_VERSION.*" # https://docs.rapids.ai/maintainers/depmgmt/ -conda remove -f rapids-build-env rapids-notebook-env +conda remove --force rapids-build-env rapids-notebook-env conda install "bokeh>=2.3.2, <2.4" gpuci_logger "Check versions" From 96a39314e17b4cde82ddfa24eab5f5b3faf87fc0 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 6 Jul 2021 10:55:17 -0700 Subject: [PATCH 8/9] revert version test patch --- ci/gpu/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 5b07cec3..03d776e7 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -59,12 +59,13 @@ gpuci_conda_retry install -y \ "cuspatial=$MINOR_VERSION.*" \ "dask-cudf=$MINOR_VERSION.*" "dask-cuda=$MINOR_VERSION.*" \ "numba>=0.51.2" \ + "bokeh>=2.3.2,<2.4" \ "rapids-build-env=$MINOR_VERSION.*" \ "rapids-notebook-env=$MINOR_VERSION.*" # https://docs.rapids.ai/maintainers/depmgmt/ -conda remove --force rapids-build-env rapids-notebook-env -conda install "bokeh>=2.3.2, <2.4" +# conda remove -f rapids-build-env rapids-notebook-env +# conda install "your-pkg=1.0.0" gpuci_logger "Check versions" python --version From 727848d1b698f80cee45ca8565e2e35cf7e763b6 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 6 Jul 2021 13:27:52 -0700 Subject: [PATCH 9/9] --force instead of -f --- ci/gpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 03d776e7..d53efa72 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -64,7 +64,7 @@ gpuci_conda_retry install -y \ "rapids-notebook-env=$MINOR_VERSION.*" # https://docs.rapids.ai/maintainers/depmgmt/ -# conda remove -f rapids-build-env rapids-notebook-env +# conda remove --force rapids-build-env rapids-notebook-env # conda install "your-pkg=1.0.0" gpuci_logger "Check versions"