Skip to content

Commit

Permalink
docs: silence dynamic examples
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau committed Jan 22, 2024
1 parent ff54bf9 commit 6fa4b43
Show file tree
Hide file tree
Showing 18 changed files with 265 additions and 166 deletions.
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def gee_configure() -> None:
Otherwise it use the simple Initialize command (asking the user to register if necessary).
"""
# only do the initialization if the credential are missing
if not ee.data._credentials:
if False:
# if not ee.data._credentials:

# if the credentials token is asved in the environment use it
if "EARTHENGINE_TOKEN" in os.environ:
Expand Down
4 changes: 2 additions & 2 deletions geetools/Array/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def full(
An array with the given dimensions, initialized to the given value.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand Down Expand Up @@ -68,7 +68,7 @@ def set(
The array with the cell set to the given value.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand Down
6 changes: 3 additions & 3 deletions geetools/ComputedObject/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def isInstance(self, klass: Type) -> ee.Number:
``1`` if the element is the passed type or ``0`` if not.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand All @@ -48,7 +48,7 @@ def save(self, path: Union[str, Path]) -> Path:
The path to the saved file.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
from tempfile import TemporaryDirectory
Expand Down Expand Up @@ -79,7 +79,7 @@ def open(cls, path: Union[str, Path]) -> ee.ComputedObject:
The ComputedObject instance.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
from tempfile import TemporaryDirectory
Expand Down
10 changes: 5 additions & 5 deletions geetools/Date/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def fromEpoch(cls, number: int, unit: str = "day") -> ee.Date:
The date as a ``ee.Date`` object.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand All @@ -55,7 +55,7 @@ def fromDOY(cls, doy: int, year: int) -> ee.Date:
The date as a ``ee.Date`` object.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand All @@ -75,7 +75,7 @@ def to_datetime(self) -> datetime:
The ``datetime.datetime`` representation of the ``ee.Date``.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand All @@ -98,7 +98,7 @@ def getUnitSinceEpoch(self, unit: str = "day") -> ee.Number:
The number of units since the epoch.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand All @@ -117,7 +117,7 @@ def isLeap(self) -> ee.Number:
``1`` if the year is a leap year, ``0`` otherwise.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand Down
2 changes: 1 addition & 1 deletion geetools/DateRange/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def split(self, interval: Union[int, ee.Number], unit: str = "day") -> ee.List:
The list of DateRanges
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand Down
6 changes: 3 additions & 3 deletions geetools/Dictionary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def fromPairs(self, list: Union[list, ee.List]) -> ee.Dictionary:
A dictionary using the pairs.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand All @@ -49,7 +49,7 @@ def sort(self) -> ee.Dictionary:
The sorted dictionary.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand All @@ -72,7 +72,7 @@ def getMany(self, list: Union[ee.List, list]) -> ee.List:
A list of values.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand Down
2 changes: 1 addition & 1 deletion geetools/Feature/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def toFeatureCollection(self) -> ee.FeatureCollection:
The FeatureCollection
Example:
.. jupyter-execute::
.. code-block:: python
import ee
import geetools
Expand Down
6 changes: 3 additions & 3 deletions geetools/FeatureCollection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def addId(
The parsed collection with a new id property
Example:
.. jupyter-execute::
.. code-block:: python
import ee
import geetools
Expand All @@ -69,7 +69,7 @@ def mergeGeometries(self) -> ee.Geometry:
the dissolved geometry
Example:
.. jupyter-execute::
.. code-block:: python
import ee
import geetools
Expand All @@ -94,7 +94,7 @@ def toPolygons(self) -> ee.FeatureCollection:
The parsed collection with only polygon/MultiPolygon geometries
Example:
.. jupyter-execute::
.. code-block:: python
import ee
import geetools
Expand Down
2 changes: 1 addition & 1 deletion geetools/Filter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def dateRange(self, range: ee.DateRange) -> Any:
The filter to apply to a collection.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand Down
2 changes: 1 addition & 1 deletion geetools/Geometry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def keepType(self, type: str) -> ee.Geometry:
type: The type of geometries to keep. Can be one of: Point, LineString, LineRing Polygon.
Returns:
.. jupyter-execute::
.. code-block:: python
import ee
import geetools
Expand Down

0 comments on commit 6fa4b43

Please sign in to comment.