Skip to content

Commit

Permalink
docs: silence dynamic examples (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau authored Jan 22, 2024
2 parents 86097ba + 484765c commit c71b1c7
Show file tree
Hide file tree
Showing 19 changed files with 267 additions and 168 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 docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
:html_theme.sidebar_secondary.remove:


Pypackage Skeleton
==================
geetools
========

.. toctree::
:hidden:
Expand Down
4 changes: 2 additions & 2 deletions geetools/Array/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,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 @@ -67,7 +67,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 @@ -23,7 +23,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 @@ -49,7 +49,7 @@ def save(self, path: pathlike) -> Path:
The path to the saved file.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
from tempfile import TemporaryDirectory
Expand Down Expand Up @@ -80,7 +80,7 @@ def open(cls, path: pathlike) -> 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 @@ -30,7 +30,7 @@ def split(self, interval: ee_int, 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 @@ -26,7 +26,7 @@ def fromPairs(self, list: ee_list) -> ee.Dictionary:
A dictionary using the pairs.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand All @@ -48,7 +48,7 @@ def sort(self) -> ee.Dictionary:
The sorted dictionary.
Examples:
.. jupyter-execute::
.. code-block:: python
import ee, geetools
Expand All @@ -71,7 +71,7 @@ def getMany(self, list: ee_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 @@ -41,7 +41,7 @@ def addId(self, name: ee_str = "id", start: ee_int = 1) -> ee.FeatureCollection:
The parsed collection with a new id property
Example:
.. jupyter-execute::
.. code-block:: python
import ee
import geetools
Expand All @@ -68,7 +68,7 @@ def mergeGeometries(self) -> ee.Geometry:
the dissolved geometry
Example:
.. jupyter-execute::
.. code-block:: python
import ee
import geetools
Expand All @@ -93,7 +93,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
Loading

0 comments on commit c71b1c7

Please sign in to comment.