Skip to content

Commit

Permalink
refactor: remove http_transport method on ee initialization. see #914
Browse files Browse the repository at this point in the history
  • Loading branch information
dfguerrerom committed May 5, 2024
1 parent e9bae6c commit 4ae0ac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions sepal_ui/scripts/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from warnings import warn

import ee
import httplib2
import ipyvuetify as v
from deprecated.sphinx import versionadded

Expand Down Expand Up @@ -47,7 +46,6 @@ def init_ee() -> None:
Note:
As all init method of pytest-gee, this method will fallback to a regular ``ee.Initialize()`` if the environment variable is not found e.g. on your local computer.
"""

if not ee.data._credentials:
credential_folder_path = Path.home() / ".config" / "earthengine"
credential_file_path = credential_folder_path / "credentials"
Expand Down Expand Up @@ -75,7 +73,7 @@ def init_ee() -> None:

# if the user is in local development the authentication should
# already be available
ee.Initialize(project=project_id, http_transport=httplib2.Http())
ee.Initialize(project=project_id)


################################################################################
Expand Down
4 changes: 2 additions & 2 deletions sepal_ui/scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from urllib.parse import urlparse

import ee
import httplib2
import ipyvuetify as v
import requests
import tomli
Expand Down Expand Up @@ -141,6 +140,7 @@ def init_ee() -> None:
As all init method of pytest-gee, this method will fallback to a regular ``ee.Initialize()`` if the environment variable is not found e.g. on your local computer.
"""
if not ee.data._credentials:
print("initializing earth engine")
credential_folder_path = Path.home() / ".config" / "earthengine"
credential_file_path = credential_folder_path / "credentials"

Expand All @@ -167,7 +167,7 @@ def init_ee() -> None:

# if the user is in local development the authentication should
# already be available
ee.Initialize(project=project_id, http_transport=httplib2.Http())
ee.Initialize(project=project_id)


def normalize_str(msg: str, folder: bool = True) -> str:
Expand Down

0 comments on commit 4ae0ac8

Please # to comment.