sepal_ui.scripts.utils#

All the helper function of sepal-ui.

Functions

check_input

Check if the inpupt value is initialized.

create_download_link

Create a clickable link to download the pathname target.

geojson_to_ee

Transform a geojson object into a featureCollection or a Geometry.

get_app_version

Get the current version of the a github project using the pyproject.toml file in the root.

get_changelog

Check if the repository contains a changelog file and/or a remote release and return its content.

get_file_size

Get the file size as string of 2 digit in the adapted scale (B, KB, MB....).

get_repo_info

Get the repository name and owner from the git config file.

hide_component

Hide a vuetify based component.

init_ee

Initialize earth engine according to the environment.

next_string

Create a string followed by an underscore and a consecutive number.

normalize_str

Normalize an str to make it compatible with file naming (no spaces, special chars ...etc).

random_string

Generates a random string of fixed length.

set_config

Set a config variable.

set_config_locale

Set the provided local in the sepal-ui config file.

set_config_theme

Set the provided theme in the sepal-ui config file.

set_type

Return a pre-defined material colors based on the requested type_ parameter.

show_component

Show a vuetify based component.

to_colors

Transform any color type into a color in the specified output format.