Skip to content

Commit

Permalink
improve docs to mention custom processes, so that custom process grap…
Browse files Browse the repository at this point in the history
…hs can also be built #40
  • Loading branch information
jdries committed Nov 30, 2019
1 parent 7fd8350 commit 3ad3d7c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx_autodoc_annotation',
'sphinx_autodoc_typehints',
'sphinx.ext.viewcode',
'sphinx.ext.doctest']

Expand Down
23 changes: 21 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,25 @@ after that, we can simply apply it along a dimension::

>>> smoothed_evi = evi_cube_masked.apply_dimension(smoothing_udf,runtime='Python')

Using custom processes
----------------------
An openEO backend may offer processes that are not part of the core API, or the client may not yet
have a corresponding method for a process that you wish to use. In that case, you can fall back to
a more generic API that allows you to add processes directly.

To add a simple process to the graph, use: :func:`~openeo.rest.imagecollectionclient.ImageCollectionClient#graph_add_process`.
This will return a new ImageCollection with the new process.

Example::

>>> args= {
'data': {'from_node': cube.node_id},
'param': 3.14
}
cube.graph_add_process('my_process',args)

To be able to use custom processes, you need to have some documentation. A list of processes can be
retrieved with: :func:`~openeo.rest.connection.Connection#list_processes`.

API
===
Expand All @@ -138,10 +157,10 @@ use the lower level classes.


openeo.rest.connection
-------------------------
----------------------

.. automodule:: openeo.rest.connection
:members: Connection OpenEoApiError
:members: Connection, OpenEoApiError


openeo.rest.imagecollectionclient
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"dev": [
"sphinx",
"sphinx-autodoc-annotation",
"sphinx-autodoc-typehints",
"mock",
"requests-mock",
"pytest",
Expand Down

0 comments on commit 3ad3d7c

Please sign in to comment.