Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Clarify UDF documentation on required function type annotations. ([#757](https://github.com/Open-EO/openeo-python-client/issues/757))

## [0.50.0] - 2026-05-18

### Added
Expand Down
20 changes: 20 additions & 0 deletions docs/udf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,26 @@ as defined in the :py:mod:`openeo.udf.udf_signatures` module,
so that the back-end knows what the *entrypoint* function is
of your UDF implementation.

The function name and Python type annotations are part of that signature:
they are used to detect how the UDF should be invoked.
Do not omit the type annotations on the UDF entrypoint, even if your editor
or linter would otherwise consider them optional.
For example, this is not enough:

.. code-block:: python

def apply_datacube(cube, context):
...

Instead, write the full annotated signature:

.. code-block:: python

import xarray

def apply_datacube(cube: xarray.DataArray, context: dict) -> xarray.DataArray:
...


Module ``openeo.udf.udf_signatures``
-------------------------------------
Expand Down