Skip to content

Commit 1fa5e46

Browse files
authored
Merge pull request #135 from ESA-APEx/openeo_lifecycle
upd_writer(#61): added development flow
2 parents 777c3f3 + af3b069 commit 1fa5e46

File tree

1 file changed

+68
-26
lines changed

1 file changed

+68
-26
lines changed

guides/udp_writer_guide.qmd

Lines changed: 68 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,51 @@
22
title: Guide for writing openEO User Defined Processes
33
---
44

5+
## Development Flow
6+
7+
The development of an openEO User Defined Process (UDP) starts with the creation of a process graph. This
8+
graph is a visual representation of the data processing workflow, which can be built using the openEO API and its tools.
9+
The graph consists of nodes, each representing a specific process or operation, and edges that define the flow of data
10+
between these nodes.
11+
12+
To start with the development of an openEO process graph, you need to select an openEO backend that provides access to the
13+
data you want to process. The backend is responsible for executing the process graph and returning the results. Once you
14+
have selected a backend, you can begin building your process graph by using the existing tools and libraries provided by
15+
openEO. These tools allow you to create, modify, and visualize your process graph in a user-friendly manner. Once you have
16+
created your process graph, you can test it on the selected openEO backend to ensure that it works as expected. This step
17+
is crucial, as it allows you to identify any issues or errors in your process graph before packaging it as a User Defined
18+
Process (UDP).
19+
20+
Once your process graph is complete, you can package it into a an openEO UDP, enabling it to be executed by
21+
other project members or the broader community. As a final step, you may onboard the service onto the ESA NoR,
22+
establishing a cost model and additional revenue stream for service execution.
23+
24+
The full development flow for creating and sharing an openEO UDP is summarized below:
25+
26+
1. **Create an Account**: Create an account with an existing openEO API provider, preferably an\
27+
[APEx-compliant hosting platform](../propagation/platforms.md). This is where the UDP will be hosted.
28+
2. **Create the Process Graph**: Develop a processing graph that represents your workflow using the existing tools provided\
29+
by your chosen. For users with an existing Python implementation, openEO offers flexibility in developing their process\
30+
graph. They can:
31+
a. Utilize predefined openEO processes: map your existing Python functions to equivalent openEO operations.
32+
b. Create [User Defined Functions (UDF)](https://open-eo.github.io/openeo-python-client/udf.html): Create custom\
33+
functions to be executed by openEO.
34+
3. **Test the Process Graph**: Test the graph on your selected platform.
35+
4. **Encapsulate as a UDP**: The process graph is then encapsulated as a UDP, complete with metadata, as described in the\
36+
next section.
37+
5. **Test the UDP**: Test the UDP on one or more openEO-based platforms to validate its functionality.
38+
6. **Share the UDP**: Once validated, the UDP is shared as a JSON definition for broader use.
39+
7. **Register the UDP on ESA NoR**: Define a cost model, making the service available on the ESA Network of
40+
Resources.
41+
42+
::: {.callout-tip}
43+
Keep in mind that APEx offers [Algorithm Porting](../propagation/porting.md)
44+
and [Algorithm Onboarding](../propagation/onboarding.md) support to help you with transforming your algorithm into an
45+
openEO UDP, onboarding it onto an [APEx-compliant hosting platform](../propagation/platforms.md), registering it in the
46+
[APEx Algorithm Services Catalogue](../propagation/onboarding.md#apex-algorithm-services-catalogue) and its onboarding onto
47+
the [ESA Network of Resources](https://portfolio.nor-discover.org/).
48+
:::
49+
550
## Creating an openEO User Defined Process {#sec-udp-writing}
651

752
User defined processes (UDPs) are one out of two standardised options that APEx offers to publish algorithms as a
@@ -13,15 +58,11 @@ the[APEx Algorithm Services Catalogue](../propagation/onboarding.md#apex-algorit
1358
For more background on UDP's, or a basic tutorial on creating them, the open source Python client provides
1459
[a good starting point](https://open-eo.github.io/openeo-python-client/udp.html).
1560

16-
Keep in mind that APEx offers [Algorithm Porting](../propagation/porting.md)
17-
and [Algorithm Onboarding](../propagation/onboarding.md) support to help you with transforming your algorithm into an
18-
openEO UDP and onboarding it onto an [APEx-compliant hosting platform](../propagation/platforms.md).
19-
2061
### Example cases
2162

2263
The best way to learn how to write a UDP is to look at existing examples:
2364

24-
- `max_ndvi_composite`: [UDP code](https://github.com/ESA-APEx/apex_algorithms/tree/main/algorithm_catalog/vito/max_ndvi_composite)
65+
* `max_ndvi_composite`: [UDP code](https://github.com/ESA-APEx/apex_algorithms/tree/main/algorithm_catalog/vito/max_ndvi_composite)
2566
and [description](https://github.com/ESA-APEx/apex_algorithms/blob/main/algorithm_catalog/vito/max_ndvi_composite/openeo_udp/max_ndvi_composite_description.md).
2667

2768
### Organizing your code
@@ -39,15 +80,16 @@ more discoverable.
3980
APEx requires you to use versioning, to ensure that changes in your algorithm are clearly communicated and visible to users.
4081
A good way to do this is to use [semantic versioning](https://semver.org/), which is a widely used versioning scheme.
4182

42-
In combination with git tags, this allows you to easily track different versions of your UDP JSON, and share immutable links to
43-
specific versions. In addition, you can also create tags that always point to the latest development or stable version.
83+
In combination with git tags, this allows you to easily track different versions of your UDP JSON, and share immutable
84+
links to specific versions. In addition, you can also create tags that always point to the latest development or stable version.
4485

4586
One use case is an algorithm change that requires you to change parameters. We refer to such a change as 'backward incompatible',
4687
because users of the existing algorithm will not be able to switch to the new version without an update on their side.
4788
In such a case, you can create a new UDP version, and keep the old one available for users that are not ready to switch yet.
48-
Also in the UDP catalog, we recommend to keep both versions side-by-side for a certain time frame before removing the old one.
89+
Also in the UDP catalog, we recommend to keep both versions side-by-side for a certain time frame before removing the old
90+
one.
4991

50-
A changelog is also required, to document the changes between versions. Guidance on how to keep changelogs can be found
92+
A changelog is also required, to document the changes between versions. Guidance on how to keep changelogs can be found
5193
[online](https://keepachangelog.com/en/1.1.0/).
5294

5395
It is not mandatory to store your UDP JSON in the APEx git repository, especially if the project already maintains an open
@@ -84,8 +126,8 @@ can even be left empty (`null`).
84126
For maximum flexibility, compatibility and the best user experience, we recommend to perform spatial filtering in your
85127
algorithm:
86128

87-
- directly in `load_collection`/`load_stac` (instead of separate `filter_bbox`/`filter_spatial` processes)
88-
- using a parameter named `spatial_extent` (unless there are good reasons otherwise)
129+
* directly in `load_collection`/`load_stac` (instead of separate `filter_bbox`/`filter_spatial` processes)
130+
* using a parameter named `spatial_extent` (unless there are good reasons otherwise)
89131
spatial filtering in these processes, and also use `spatial_extent` as the parameter name unless there are good
90132
reasons otherwise.
91133

@@ -114,7 +156,7 @@ generated.
114156

115157
### Include default parameters within the UDP
116158

117-
Via the [@openeo_processing_parameters] extension, platform specific parameters (also known as `job options`) can be
159+
Via the [@openeo_processing_parameters] extension, platform specific parameters (also known as `job options`) can be
118160
included directly in the process definition. While the primary recommendation is to avoid using platform specific parameters,
119161
it is nevertheless a very good idea to include them when they are necessary.
120162

@@ -155,23 +197,23 @@ the [APEx Algorithm Catalogue GitHub repository](https://github.com/ESA-APEx/ape
155197

156198
An example json is provided below. The properties to modify are listed here:
157199

158-
- *id*: a unique identifier for your process
159-
- *created* and *updated* timestamps
160-
- *title*: a descriptive title
161-
- *description*: a detailed description of the process
162-
- *contacts*: a list of contacts, with at least one principal investigator
163-
- *keywords*: a list of free form keywords
164-
- *themes*: Applicable concepts from a scheme. Concepts can be found in
200+
* *id*: a unique identifier for your process
201+
* *created* and *updated* timestamps
202+
* *title*: a descriptive title
203+
* *description*: a detailed description of the process
204+
* *contacts*: a list of contacts, with at least one principal investigator
205+
* *keywords*: a list of free form keywords
206+
* *themes*: Applicable concepts from a scheme. Concepts can be found in
165207
the [ESA Data Ontology](https://data.esa.int/esado)
166-
- *license*: the license under which the process is published. You can use
208+
* *license*: the license under which the process is published. You can use
167209
the [SPDX license list](https://spdx.org/licenses/) for this. Proprietary licenses are possible, within the terms of
168210
your ESA project.
169211

170212
The *links* section is crucial, the following "rel" values are mandatory:
171213

172-
- *openeo-process*: exactly one link to the JSON document that defines the process
173-
- *service*: at least one link to an openEO backend that is able to execute the process
174-
- *example*: at least one link to a STAC metadata file that shows the output of the process
214+
* *openeo-process*: exactly one link to the JSON document that defines the process
215+
* *service*: at least one link to an openEO backend that is able to execute the process
216+
* *example*: at least one link to a STAC metadata file that shows the output of the process
175217

176218
The *type* field of these links should be set to `application/json`. Please provide a descriptive *title* for each link,
177219
allowing to understand what the link is about.
@@ -334,15 +376,15 @@ Example benchmark definition:
334376

335377
Note how each benchmark scenario references:
336378

337-
- the target openEO backend to use.
338-
- an openEO process graph to execute.
379+
* the target openEO backend to use.
380+
* an openEO process graph to execute.
339381
The process graph will typically just contain a single node
340382
pointing with the `namespace` field to the desired process definition
341383
at a URL, following
342384
the [remote process definition extension](https://github.com/Open-EO/openeo-api/tree/draft/extensions/remote-process-definition).
343385
The URL will typically be a raw GitHub URL to the JSON file in the `openeo_udp` folder, but it can also be a URL to a
344386
different location.
345-
- reference data to which actual results should be compared.
387+
* reference data to which actual results should be compared.
346388

347389
#### Defining and updating benchmark reference data
348390

0 commit comments

Comments
 (0)