From f1c5406d9c79e946703bdd3b7e5ce2f7e1789373 Mon Sep 17 00:00:00 2001 From: dfguerrerom Date: Fri, 25 Aug 2023 15:14:18 +0200 Subject: [PATCH 1/4] fix: support python<3.9, by importing typing types --- component/scripts/planet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/component/scripts/planet.py b/component/scripts/planet.py index 64b7272..758a438 100644 --- a/component/scripts/planet.py +++ b/component/scripts/planet.py @@ -1,5 +1,6 @@ """this file will be used as a singleton object in the explorer tile.""" +from typing import Tuple, List, Dict import re from datetime import datetime @@ -25,7 +26,7 @@ ) # NICFI bianual -def mosaic_name(mosaic: str) -> tuple[str, str]: +def mosaic_name(mosaic: str) -> Tuple[str, str]: """Give back the shorten name of the mosaic so that it can be displayed on the thumbnails. Args: @@ -54,7 +55,7 @@ def mosaic_name(mosaic: str) -> tuple[str, str]: return type_, res -def order_basemaps(mosaics: dict) -> list[dict[str, str]]: +def order_basemaps(mosaics: dict) -> List[Dict[str, str]]: """create a list of items for the dynamic selector""" # get the basemap names @@ -120,7 +121,6 @@ def download_quads( total = len(quads) alert.update_progress(0, cm.planet.down.progress, total=total) for i, quad_id in enumerate(quads): - # update the progress in advance alert.update_progress(i, total=total) From addf38e8a09c5398e286d00d0d77f3555897df77 Mon Sep 17 00:00:00 2001 From: dfguerrerom Date: Fri, 25 Aug 2023 15:26:10 +0200 Subject: [PATCH 2/4] style: lint --- component/scripts/planet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/component/scripts/planet.py b/component/scripts/planet.py index 758a438..0eb8272 100644 --- a/component/scripts/planet.py +++ b/component/scripts/planet.py @@ -1,8 +1,8 @@ """this file will be used as a singleton object in the explorer tile.""" -from typing import Tuple, List, Dict import re from datetime import datetime +from typing import Dict, List, Tuple import requests from geopandas import GeoDataFrame From 4daebafe7815e0976fb79091bba6fa882d40f215 Mon Sep 17 00:00:00 2001 From: dfguerrerom Date: Fri, 25 Aug 2023 15:29:58 +0200 Subject: [PATCH 3/4] style: lint --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 00de236..0e3548e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,11 +15,11 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: "3.10" - name: Install mamba uses: mamba-org/setup-micromamba@v1 with: - environment-file: 'build-environment.yml' + environment-file: "build-environment.yml" init-shell: bash - name: Build the JupyterLite site shell: bash -l {0} From 4c24f850f334e0b991d052d1a9146e3cdb233f9b Mon Sep 17 00:00:00 2001 From: dfguerrerom Date: Fri, 25 Aug 2023 15:31:36 +0200 Subject: [PATCH 4/4] style: lint --- build-environment.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build-environment.yml b/build-environment.yml index 90626f1..70674e4 100644 --- a/build-environment.yml +++ b/build-environment.yml @@ -2,9 +2,9 @@ name: build-env channels: - conda-forge dependencies: - - 'python' - - 'pip' - - 'sepal-ui' + - "python" + - "pip" + - "sepal-ui" - pip: - - voici>=0.4.4,<0.5.0 - - jupyterlite-xeus-python>=0.8.1,<0.9.0 + - voici>=0.4.4,<0.5.0 + - jupyterlite-xeus-python>=0.8.1,<0.9.0