From eb518057404393757a216995f50e45caa873c475 Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Mon, 30 Sep 2024 07:59:37 +0000 Subject: [PATCH] fix: use the fuly static definition of GEE --- docs/usage/layout.rst | 12 ------------ geetools/Array/__init__.py | 12 +----------- geetools/DateRange/__init__.py | 13 +------------ geetools/__init__.py | 4 ++-- pyproject.toml | 2 +- tests/test_Array.py | 1 - tests/test_DateRange.py | 1 - 7 files changed, 5 insertions(+), 40 deletions(-) diff --git a/docs/usage/layout.rst b/docs/usage/layout.rst index ddc15d18..38587ce1 100644 --- a/docs/usage/layout.rst +++ b/docs/usage/layout.rst @@ -20,12 +20,6 @@ Earth Engine classes ee.Array ^^^^^^^^ -As reported in https://github.com/gee-community/geetools/issues/173, this object cannot be extended before the API of Earth Enfine is initialized. So to use the following methods, you will be forced to manually import the following: - -.. code-block:: python - - from geetools.Array import ArrayAccessor - constructor ########### @@ -94,12 +88,6 @@ helper ee.DateRange ^^^^^^^^^^^^ -As reported in https://github.com/gee-community/geetools/issues/206, this object cannot be extended before the API of Earth Enfine is initialized. So to use the following methods, you will be forced to manually import the following: - -.. code-block:: python - - from geetools.DateRange import DateRangeAccessor - Extra operations ################ diff --git a/geetools/Array/__init__.py b/geetools/Array/__init__.py index b8fa215d..7449704e 100644 --- a/geetools/Array/__init__.py +++ b/geetools/Array/__init__.py @@ -1,14 +1,4 @@ -"""Extra methods for the ``ee.Array`` class. - -.. warning:: - - As reported in https://github.com/gee-community/geetools/issues/173, this object cannot be extended before the API of - Earth Enfine is initialized. So to use the following methods, you will be forced to manually import the following: - - .. code-block:: python - - from geetools.Array import ArrayAccessor -""" +"""Extra methods for the ``ee.Array`` class.""" from __future__ import annotations import ee diff --git a/geetools/DateRange/__init__.py b/geetools/DateRange/__init__.py index 36a88ab1..ca1c0f66 100644 --- a/geetools/DateRange/__init__.py +++ b/geetools/DateRange/__init__.py @@ -1,15 +1,4 @@ -"""Extra tools for the ``ee.DateRange`` class. - -.. warning:: - - As reported in https://github.com/gee-community/geetools/issues/206, for user using ``earthengine-api<=0.1.388`` - this object cannot be extended before the API of Earth Enfine is initialized. So to use the - following methods, you will be forced to manually import the following: - - .. code-block:: python - - from geetools.DateRange import DateRangeAccessor -""" +"""Extra tools for the ``ee.DateRange`` class.""" from __future__ import annotations import ee diff --git a/geetools/__init__.py b/geetools/__init__.py index a47d0b5c..d1039b18 100644 --- a/geetools/__init__.py +++ b/geetools/__init__.py @@ -47,8 +47,8 @@ # waiting for a fix in # https://github.com/gee-community/geetools/issues/173 # https://github.com/gee-community/geetools/issues/206 -# from .Array import ArrayAccessor -# from .DateRange import DateRangeAccessor +from .Array import ArrayAccessor +from .DateRange import DateRangeAccessor __title__ = "geetools" diff --git a/pyproject.toml b/pyproject.toml index 42f27d7a..76428447 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "earthengine-api>=0.1.397", # support for ee.data.createFolder + "earthengine-api>=1", # fully static implementation "requests", "pandas", "geopandas", diff --git a/tests/test_Array.py b/tests/test_Array.py index 7c8ada12..068e9f9d 100644 --- a/tests/test_Array.py +++ b/tests/test_Array.py @@ -3,7 +3,6 @@ import pytest import geetools -from geetools.Array import ArrayAccessor # noqa: F401 class TestFull: diff --git a/tests/test_DateRange.py b/tests/test_DateRange.py index 050845ec..bbe6db77 100644 --- a/tests/test_DateRange.py +++ b/tests/test_DateRange.py @@ -3,7 +3,6 @@ import pytest import geetools -from geetools.DateRange import DateRangeAccessor # noqa: F401 class TestSplit: