diff --git a/.gitignore b/.gitignore index d43a5d9..f77c28d 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,4 @@ dmypy.json # Pyre type checker .pyre/ +.vscode/sftp.json diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d734a73 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +## 0.1.0 (2023-10-07) + +### Feat + +- versioning +- add a mamba environment +- deploy a github page + +### Fix + +- support python<3.9, by importing typing types +- add build-environment file +- display the mosaics in reverse order +- restore downloading +- control the colors +- load maps when mosaic is selected +- lint to planet api +- add AOi selector +- move to sepal-ui 2.16.2 +- add planet to requirement + +### Refactor + +- remove useless notebooks diff --git a/about_ui.ipynb b/about_ui.ipynb deleted file mode 100644 index f1fa886..0000000 --- a/about_ui.ipynb +++ /dev/null @@ -1,86 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8c8ab059", - "metadata": {}, - "outputs": [], - "source": [ - "from sepal_ui import sepalwidgets as sw" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "68a57857", - "metadata": {}, - "outputs": [], - "source": [ - "# create the Html body of your about section\n", - "about_tile = sw.TileAbout(\"utils/ABOUT.md\") # relative path to your markdown file" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ce16c406", - "metadata": {}, - "outputs": [], - "source": [ - "# create the html body of the FAO disclaimer\n", - "# its mother class is sw.Tile so you can still replace it with another message if you want (discouraged)\n", - "disclaimer_tile = sw.TileDisclaimer()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e1abbd10", - "metadata": {}, - "outputs": [], - "source": [ - "about_tile" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0f1dc110", - "metadata": {}, - "outputs": [], - "source": [ - "disclaimer_tile" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5686017f", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/aoi_selector_ui.ipynb b/aoi_selector_ui.ipynb deleted file mode 100644 index 5e12735..0000000 --- a/aoi_selector_ui.ipynb +++ /dev/null @@ -1,40 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from sepal_ui import aoi\n", - "\n", - "# create the tile\n", - "aoi_tile = aoi.AoiTile(methods=[\"-POINTS\"], gee=False)\n", - "\n", - "# this tile will only be displayed if voila is launch from this notebook\n", - "aoi_tile" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.9" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/component/tile/down_control.py b/component/tile/down_control.py index f175503..e62587c 100644 --- a/component/tile/down_control.py +++ b/component/tile/down_control.py @@ -10,7 +10,6 @@ class DownView(sw.Tile): - grid = None "the grod associated to the aoi" @@ -20,7 +19,6 @@ def __init__( planet_model: PlanetModel, order_model: cmod.OrderModel, ): - # save models as members self.aoi_model = aoi_model self.planet_model = planet_model @@ -36,9 +34,8 @@ def __init__( self.btn.on_event("click", self.download_quads) self.aoi_model.observe(lambda *args: setattr(self, "grid", None), "name") - @sd.loading_button(debug=True) + @sd.loading_button() def download_quads(self, *args) -> None: - if not self.aoi_model.name: raise Exception(cm.down_control.error.no_aoi) @@ -66,7 +63,6 @@ def __init__( order_model: cmod.OrderModel, **kwargs ): - self.view = DownView(aoi_model, planet_model, order_model) # create the control diff --git a/explorer_ui.ipynb b/explorer_ui.ipynb deleted file mode 100644 index 9feb6ab..0000000 --- a/explorer_ui.ipynb +++ /dev/null @@ -1,63 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "c45ed953", - "metadata": {}, - "outputs": [], - "source": [ - "from component import tile" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "119243b3", - "metadata": {}, - "outputs": [], - "source": [ - "explorer_tile = tile.ExplorerTile(aoi_tile.view.model)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "3bec2c91", - "metadata": {}, - "outputs": [], - "source": [ - "explorer_tile" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b6d81ad1", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/no_ui.ipynb b/no_ui.ipynb index f5a836f..55595c4 100644 --- a/no_ui.ipynb +++ b/no_ui.ipynb @@ -2,48 +2,293 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ - "# add all the tiles\n", - "%run 'aoi_selector_ui.ipynb'\n", - "%run 'explorer_ui.ipynb'" + "%load_ext autoreload\n", + "%autoreload 2" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "tags": [] - }, - "outputs": [], + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "/*******************************************************************************\n", + " * remove any links from fontawesome 5 created by jupyter in favor of\n", + " * fontawesome 6. to be removed when Jupyter updates it\n", + " */\n", + "\n", + "function remove_fa5() {\n", + " let links = document.querySelectorAll(\n", + " \"link[href^='https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@^5']\"\n", + " );\n", + "\n", + " links.forEach((link) => link.remove());\n", + "}\n", + "\n", + "if (document.readyState != \"loading\") remove_fa5();\n", + "else document.addEventListener(\"DOMContentLoaded\", remove_fa5);\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "a6a2f3d0547b4cb3bd36a01d6811bef2", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "ResizeTrigger()" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ - "aoi_tile" + "from component import tile\n", + "from sepal_ui import aoi" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "019f8614e7d9445bac9e0a08b0033bb5", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VuetifyTemplate(template='