diff --git a/docs/source/conf.py b/docs/source/conf.py index d802f5b6..d009c447 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -26,7 +26,7 @@ author = 'Pierrick Rambaud' # The full version, including alpha/beta/rc tags -release = '2.0.3' +release = '2.0.4' # -- General configuration --------------------------------------------------- diff --git a/requirements.txt b/requirements.txt index d9ff113f..973019c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,4 +23,5 @@ nbsphinx pandoc ipykernel sphinx-copybutton -sepal_ui \ No newline at end of file +sepal_ui +natsort \ No newline at end of file diff --git a/sepal_ui/__init__.py b/sepal_ui/__init__.py index ac9d5c89..e8125363 100644 --- a/sepal_ui/__init__.py +++ b/sepal_ui/__init__.py @@ -1,6 +1,6 @@ __author__ = """Pierrick Rambaud""" __email__ = "pierrick.rambaud49@gmail.com" -__version__ = "2.0.3" +__version__ = "2.0.4" # direct access to colors from sepal_ui.frontend import styles diff --git a/sepal_ui/mapping/mapping.py b/sepal_ui/mapping/mapping.py index a862cff0..9197d04f 100644 --- a/sepal_ui/mapping/mapping.py +++ b/sepal_ui/mapping/mapping.py @@ -51,6 +51,8 @@ class SepalMap(geemap.Map): def __init__(self, basemaps=[], dc=False, vinspector=False, gee=True, **kwargs): + self.world_copy_jump=True + # Init the map super().__init__( ee_initialize = False, # we take care of the initialization on our side diff --git a/sepal_ui/sepalwidgets/app.py b/sepal_ui/sepalwidgets/app.py index 78911248..b904cbc0 100644 --- a/sepal_ui/sepalwidgets/app.py +++ b/sepal_ui/sepalwidgets/app.py @@ -331,8 +331,9 @@ def show_tile(self, name): # activate the drawerItem if self.navDrawer: - for i in self.navDrawer.items: - if name == i._metadata['card_id']: - i.input_value = True + items = (i for i in self.navDrawer.items if i._metadata != None) + for i in items: + if name == i._metadata['card_id']: + i.input_value = True return self \ No newline at end of file diff --git a/sepal_ui/sepalwidgets/inputs.py b/sepal_ui/sepalwidgets/inputs.py index 226dfec8..416c2818 100644 --- a/sepal_ui/sepalwidgets/inputs.py +++ b/sepal_ui/sepalwidgets/inputs.py @@ -7,6 +7,7 @@ import pandas as pd import ee import geopandas as gpd +from natsort import humansorted from sepal_ui.frontend.styles import * from sepal_ui.scripts import utils as su @@ -273,8 +274,8 @@ def _get_items(self): children.append(v.ListItemActionText(children=[file_size])) file_list.append(v.ListItem(value=str(el), children=children)) - folder_list = sorted(folder_list, key=lambda x: x.value) - file_list = sorted(file_list, key=lambda x: x.value) + folder_list = humansorted(folder_list, key=lambda x: x.value) + file_list = humansorted(file_list, key=lambda x: x.value) parent_item = v.ListItem( value=str(folder.parent), diff --git a/setup.py b/setup.py index e44043ee..4955a97b 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ 'sepal_ui.model' ], package_data={'sepal_ui': ['scripts/*.csv', 'scripts/*.md', 'message/*.json', 'bin/module_factory']}, - version = '2.0.3', + version = '2.0.4', license='MIT', description = 'Wrapper for ipyvuetify widgets to unify the display of voila dashboards in SEPAL platform', long_description = open('README.rst').read(), @@ -22,7 +22,7 @@ author = 'Pierrick Rambaud', author_email = 'pierrick.rambaud49@gmail.com', url = 'https://github.com/12rambau/sepal_ui', - download_url = 'https://github.com/12rambau/sepal_ui/archive/v_2.0.3.tar.gz', + download_url = 'https://github.com/12rambau/sepal_ui/archive/v_2.0.4.tar.gz', keywords = ['UI', 'Python', 'widget', 'sepal'], install_requires=[ 'haversine', @@ -37,7 +37,8 @@ 'deepdiff', 'colorama', 'Deprecated', - 'Unidecode' + 'Unidecode', + 'natsort' ], classifiers=[ 'Development Status :: 5 - Production/Stable',