diff --git a/example.ipynb b/example.ipynb index 11f0498..da905ce 100644 --- a/example.ipynb +++ b/example.ipynb @@ -2,20 +2,9 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 1, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "import ee \n", "\n", @@ -24,7 +13,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -33,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -44,44 +33,9 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "am = AssetManager()\n", "am.to_sidecar()" @@ -89,44 +43,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "#tm = TaskManager()\n", "#tm.to_sidecar()" @@ -134,44 +53,9 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "m = Map()\n", "m.to_sidecar()" @@ -179,44 +63,9 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "dataset = (\n", " ee.ImageCollection('ECMWF/ERA5_LAND/HOURLY')\n", diff --git a/ipygee/asset.py b/ipygee/asset.py index e113891..2d21902 100644 --- a/ipygee/asset.py +++ b/ipygee/asset.py @@ -190,7 +190,9 @@ def get_items(self) -> List[v.ListItem]: icon = ICON_STYLE[type]["icon"] color = ICON_STYLE[type]["color"] - action = v.ListItemAction(children=[v.Icon(color=color, small=True, children=[icon])], class_="mr-1") + action = v.ListItemAction( + children=[v.Icon(color=color, small=True, children=[icon])], class_="mr-1" + ) content = v.ListItemContent(children=[v.ListItemTitle(children=[i["name"]])]) dst_list = folder_list if type in ["FOLDER", "PROJECT"] else file_list dst_list.append(v.ListItem(value=i["id"], children=[action, content])) @@ -210,7 +212,9 @@ def get_items(self) -> List[v.ListItem]: name = parent.parts[1] if parent.is_project() else parent.name name = name or "." # special case for the root - action = v.ListItemAction(children=[v.Icon(color=color, small=True, children=[icon])], class_="mr-1") + action = v.ListItemAction( + children=[v.Icon(color=color, small=True, children=[icon])], class_="mr-1" + ) content = v.ListItemContent(children=[v.ListItemTitle(children=[name])]) item = v.ListItem(value=str(parent), children=[action, content]) @@ -243,9 +247,9 @@ def on_reload(self, *args): """Reload the current folder.""" try: self.on_item_select(change={"new": self.folder}) - except ValueError: + except ValueError: self.on_item_select(change={"new": ee.Asset(self.folder).parent.as_posix()}) - + def on_copy(self, *args): """Copy the selected item to clipboard.""" self.send({"method": "clip", "args": [self.w_selected.v_model]})