Open-EO / openeo-python-client

Python client API for OpenEO
https://open-eo.github.io/openeo-python-client/
Apache License 2.0
143 stars 36 forks source link

Eliminate wrong assumptions about "terminal" nodes #583

Open soxofaan opened 3 days ago

soxofaan commented 3 days ago

The process graph building logic in Python client quite heavily works from assumption about the equivalence

"end node" = "result node" = "save_result"

which works for most use cases, but that's not fully in line with full openEO API.

also see https://github.com/Open-EO/openeo-geopyspark-driver/issues/424#issuecomment-2199780221:

Some more insights from https://github.com/Open-EO/openeo-processes/issues/279 and https://github.com/Open-EO/openeo-api/issues/427 about different kinds of terminal nodes in the openEO API

  • a process graph can have multiple "end nodes": leaf nodes that are not input to another node
  • a process graph must have one "result node": node with "result": True.
    • The result node is actually just important in the the context of a "callback" (in a "parent" process like apply, reduce_dimension, ...) to determine the value that has to be used by the parent process
    • The "result" property has little meaning for "top-level" graphs
  • the result node does not have to be an "end node". Result nodes can be input to subsequent nodes
  • a "save_result" node neither has to be "end node" or "result node" to be executed
soxofaan commented 3 days ago

some related tickets