From ce47ce07a1312444607c4b4889394c6ccf014bbe Mon Sep 17 00:00:00 2001 From: dfguerrerom Date: Wed, 20 Dec 2023 21:50:40 +0100 Subject: [PATCH] refactor: remove auth --- ui.ipynb | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/ui.ipynb b/ui.ipynb index 6ee1450..83456ac 100644 --- a/ui.ipynb +++ b/ui.ipynb @@ -1,29 +1,5 @@ { "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "6f434bc9", - "metadata": {}, - "outputs": [], - "source": [ - "import json\n", - "from pathlib import Path\n", - "import ee\n", - "\n", - "\n", - "def authenticate_gee():\n", - " \"\"\"Authenticate GEE using the credentials file in the user's home directory.\"\"\"\n", - " credential_folder_path = Path.home() / \".config\" / \"earthengine\"\n", - " credential_file_path = credential_folder_path / \"credentials\"\n", - " credentials = json.loads(credential_file_path.read_text())\n", - " project = credentials.get(\"project_id\", credentials.get(\"project\", None))\n", - " ee.Initialize(project=project)\n", - " assert ee.data.getAssetRoots(), \"Error: You have not initialized the GEE home folder. Please follow the the SEPAL documentation: https://docs.sepal.io/en/latest/setup/gee.html#initialize-the-home-folder.\"\n", - " \n", - "authenticate_gee()\n" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -154,4 +130,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} +} \ No newline at end of file