From 2794d9ce47d540c32368ff43bfff059770afe7ef Mon Sep 17 00:00:00 2001 From: dfguerrerom Date: Tue, 20 Jun 2023 12:59:44 +0000 Subject: [PATCH 1/4] fix: closes #838. remove inline js comments --- sepal_ui/frontend/js/jupyter_embed.js | 2 +- sepal_ui/frontend/js/jupyter_fullscreen.js | 2 +- sepal_ui/frontend/js/jupyter_resize.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sepal_ui/frontend/js/jupyter_embed.js b/sepal_ui/frontend/js/jupyter_embed.js index 06a6aa36..15e83ea1 100644 --- a/sepal_ui/frontend/js/jupyter_embed.js +++ b/sepal_ui/frontend/js/jupyter_embed.js @@ -1,4 +1,4 @@ -// set a selected map to embed mode (i.e. default display) +/* set a selected map to embed mode (i.e. default display) */ var i = 0; const wait_unitl_element_appear = setInterval(() => { var element = document.querySelector(".%s .leaflet-container"); diff --git a/sepal_ui/frontend/js/jupyter_fullscreen.js b/sepal_ui/frontend/js/jupyter_fullscreen.js index 126f4f63..1a22651c 100644 --- a/sepal_ui/frontend/js/jupyter_fullscreen.js +++ b/sepal_ui/frontend/js/jupyter_fullscreen.js @@ -1,4 +1,4 @@ -// set a selected map to fullscreen +/* set a selected map to fullscreen */ var i = 0; const wait_unitl_element_appear = setInterval(() => { var element = document.querySelector(".%s .leaflet-container"); diff --git a/sepal_ui/frontend/js/jupyter_resize.js b/sepal_ui/frontend/js/jupyter_resize.js index 61b6a4e9..dcfb68cc 100644 --- a/sepal_ui/frontend/js/jupyter_resize.js +++ b/sepal_ui/frontend/js/jupyter_resize.js @@ -1,2 +1,2 @@ -// force the resize event. usefull for drawer clicks +/* force the resize event. usefull for drawer clicks*/ window.dispatchEvent(new Event("resize")); From 64e8698c37361a55505dc10702a828dbebb8fd6c Mon Sep 17 00:00:00 2001 From: dfguerrerom Date: Tue, 20 Jun 2023 13:17:22 +0000 Subject: [PATCH 2/4] style: fix misspell --- sepal_ui/frontend/js/jupyter_resize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sepal_ui/frontend/js/jupyter_resize.js b/sepal_ui/frontend/js/jupyter_resize.js index dcfb68cc..a88a7a16 100644 --- a/sepal_ui/frontend/js/jupyter_resize.js +++ b/sepal_ui/frontend/js/jupyter_resize.js @@ -1,2 +1,2 @@ -/* force the resize event. usefull for drawer clicks*/ +/* force the resize event. useful for drawer clicks*/ window.dispatchEvent(new Event("resize")); From 416b390ec1486dc5b55088ede16904009e242b1e Mon Sep 17 00:00:00 2001 From: dfguerrerom Date: Tue, 20 Jun 2023 15:51:15 +0200 Subject: [PATCH 3/4] test: test raise exception --- tests/test_mapping/test_SepalMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_mapping/test_SepalMap.py b/tests/test_mapping/test_SepalMap.py index b6f4f220..7d72a3e4 100644 --- a/tests/test_mapping/test_SepalMap.py +++ b/tests/test_mapping/test_SepalMap.py @@ -190,7 +190,7 @@ def test_add_ee_layer_exceptions() -> None: ) ) - with pytest.raises(AttributeError): + with pytest.raises(ee.ee_exception.EEException): map_.addLayer(geometry, {"invalid_propery": "red", "fillColor": None}) return From fcc13d5ba11e0ba238d9b75a617d141864a2a348 Mon Sep 17 00:00:00 2001 From: dfguerrerom Date: Tue, 20 Jun 2023 17:20:14 +0200 Subject: [PATCH 4/4] style: run black on test_sepalmap --- tests/test_mapping/test_SepalMap.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_mapping/test_SepalMap.py b/tests/test_mapping/test_SepalMap.py index 138aee9a..2d66f2cf 100644 --- a/tests/test_mapping/test_SepalMap.py +++ b/tests/test_mapping/test_SepalMap.py @@ -191,7 +191,6 @@ def test_add_ee_layer_exceptions() -> None: ) ) - with pytest.raises(EEException): map_.addLayer(geometry, {"invalid_propery": "red", "fillColor": None})