From c9e534b6a9342b5ad1cf1a2c9fc459cb0b82c753 Mon Sep 17 00:00:00 2001 From: Yogesh Kumar Baljeet Singh Date: Tue, 21 Jan 2025 12:22:56 +0100 Subject: [PATCH 1/2] Fix Chartlets version and test --- pyproject.toml | 2 +- test/webapi/viewer/test_routes.py | 114 ++++++++++++++---------------- 2 files changed, 55 insertions(+), 61 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 32b268263..31ecb6f19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ dependencies = [ "cftime>=1.6.3", "click>=8.0", "cmocean>=2.0", - "chartlets>=0.0.28,<0.1.0", + "chartlets>=0.1.0", "dask>=2021.6", "dask-image>=0.6", "deprecated>=1.2", diff --git a/test/webapi/viewer/test_routes.py b/test/webapi/viewer/test_routes.py index 0763c2e90..d8c728f8d 100644 --- a/test/webapi/viewer/test_routes.py +++ b/test/webapi/viewer/test_routes.py @@ -187,147 +187,141 @@ def test_viewer_ext_callback(self): } expected_contributions_result = { + "extensions": [{"name": "my_ext", "version": "0.0.0", "contributes": ["panels"]}], "contributions": { "panels": [ { + "name": "my_ext.my_panel_a", + "initialState": {"visible": False, "title": "Panel A"}, + "extension": "my_ext", + "layout": { + "function": { + "name": "render_panel", + "parameters": [ + { + "name": "dataset_id", + "schema": {"type": "string"}, + "default": "", + } + ], + "return": {"schema": {"type": "object", "class": "Component"}}, + }, + "inputs": [ + { + "id": "@app", + "property": "selectedDatasetId", + "noTrigger": True, + } + ], + }, "callbacks": [ { "function": { "name": "update_info_text", "parameters": [ { - "default": "", "name": "dataset_id", - "type": {"type": "string"}, + "schema": {"type": "string"}, + "default": "", }, { - "default": False, "name": "opaque", - "type": {"type": "boolean"}, + "schema": {"type": "boolean"}, + "default": False, }, { - "default": 0, "name": "color", - "type": {"type": "integer"}, + "schema": {"type": "integer"}, + "default": 0, }, { - "default": "", "name": "info_text", - "type": {"type": "string"}, + "schema": {"type": "string"}, + "default": "", }, ], - "returnType": {"type": "string"}, + "return": {"schema": {"type": "string"}}, }, "inputs": [ - { - "id": "@app", - "property": "selectedDatasetId", - }, + {"id": "@app", "property": "selectedDatasetId"}, {"id": "opaque", "property": "value"}, {"id": "color", "property": "value"}, { "id": "info_text", - "noTrigger": True, "property": "text", + "noTrigger": True, }, ], "outputs": [{"id": "info_text", "property": "text"}], } ], + }, + { + "name": "my_ext.my_panel_b", + "initialState": {"visible": False, "title": "Panel B"}, "extension": "my_ext", - "initialState": {"title": "Panel A", "visible": False}, "layout": { "function": { "name": "render_panel", "parameters": [ { - "default": "", "name": "dataset_id", - "type": {"type": "string"}, + "schema": {"type": "string"}, + "default": "", } ], - "returnType": {"class": "Component", "type": "object"}, + "return": {"schema": {"type": "object", "class": "Component"}}, }, "inputs": [ { "id": "@app", - "noTrigger": True, "property": "selectedDatasetId", + "noTrigger": True, } ], }, - "name": "my_ext.my_panel_a", - }, - { "callbacks": [ { "function": { "name": "update_info_text", "parameters": [ { - "default": "", "name": "dataset_id", - "type": {"type": "string"}, + "schema": {"type": "string"}, + "default": "", }, { - "default": False, "name": "opaque", - "type": {"type": "boolean"}, + "schema": {"type": "boolean"}, + "default": False, }, { - "default": 0, "name": "color", - "type": {"type": "integer"}, + "schema": {"type": "integer"}, + "default": 0, }, { - "default": "", "name": "info_text", - "type": {"type": "string"}, + "schema": {"type": "string"}, + "default": "", }, ], - "returnType": {"type": "string"}, + "return": {"schema": {"type": "string"}}, }, "inputs": [ - { - "id": "@app", - "property": "selectedDatasetId", - }, + {"id": "@app", "property": "selectedDatasetId"}, {"id": "opaque", "property": "value"}, {"id": "color", "property": "value"}, { "id": "info_text", - "noTrigger": True, "property": "text", + "noTrigger": True, }, ], "outputs": [{"id": "info_text", "property": "text"}], } ], - "extension": "my_ext", - "initialState": {"title": "Panel B", "visible": False}, - "layout": { - "function": { - "name": "render_panel", - "parameters": [ - { - "default": "", - "name": "dataset_id", - "type": {"type": "string"}, - } - ], - "returnType": {"class": "Component", "type": "object"}, - }, - "inputs": [ - { - "id": "@app", - "noTrigger": True, - "property": "selectedDatasetId", - } - ], - }, - "name": "my_ext.my_panel_b", }, ] }, - "extensions": [{"contributes": ["panels"], "name": "my_ext", "version": "0.0.0"}], } From 928099845ed192b3745d5044cad111a965de5505 Mon Sep 17 00:00:00 2001 From: Yogesh Kumar Baljeet Singh Date: Tue, 21 Jan 2025 17:07:04 +0100 Subject: [PATCH 2/2] Fix typo in CHANGES.md --- CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 6edc8cbe9..b1ddb6ad0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -66,9 +66,9 @@ the dataset. * The function `xcube.core.resample.resample_in_space()` now always operates lazily and therefore supports chunk-wise, parallel processing. (#1082) -* Bux fix in the `has_data` method of the `"https"` data store +* Bug fix in the `has_data` method of the `"https"` data store (`store = new_data_store("https", ...)`). (#1084) -* Bux fix in the `has_data` method of all filesystem-based data store +* Bug fix in the `has_data` method of all filesystem-based data store (`"file", "s3", "https"`). `data_type` can be any of the supported data types, e.g. for `.tif` file, `data_type` can be either `dataset` or `mldataset`. (#1084) * The explanation of the parameter `xy_scale` in the method