Repository navigation
List the supported UDF signatures in the documentation - #981
Open
sandeshbagmare wants to merge 1 commit into
Open
sandeshbagmare wants to merge 1 commit into
sandeshbagmare wants to merge 1 commit into
Conversation
The UDF page deferred to the openeo.udf.udf_signatures module through automodule, which cannot show both apply_datacube forms: the module defines the xarray.DataArray variant second, so it shadows the deprecated XarrayDataCube one and only the array form was ever rendered. Spell out every supported entrypoint in the UDF page instead, with the annotations a UDF has to write, note that the XarrayDataCube form is deprecated since 0.26.0 in favour of the data array form, and point at the module for the executable stubs that remain. Fixes Open-EO#534
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Replacing autodoc directives with plain text and code blocks removes module and function targets, breaking existing cross-references and an inbound anchor; preserve these targets while retaining both explicit examples.
1 open issue
What changed in this PR
This PR addresses #534 by documenting UDF entrypoint signatures explicitly, so users can see both apply_datacube forms rather than only the last-defined Python stub.
Changes:
- Replace generated module documentation with annotated examples and usage guidance for supported entrypoints.
- Mark the
XarrayDataCubeform as deprecated while retaining theapply_metadatawarning. - Add a comment explaining why the deprecated stub is shadowed; executable behavior is unchanged.
| File | Description |
|---|---|
openeo/udf/udf_signatures.py |
Add a comment explaining the shadowed deprecated stub. |
docs/udf.rst |
Explicitly document supported signatures, usage guidance, and deprecation status. |
Review effort: Balanced
Comment on lines
+176
to
+177
| Supported signatures | ||
| -------------------- |
Member
|
Can you share a screenshot of how this looks? This PR also introduces duplication of documentation (between docs/udf.rst and openeo/udf/udf_signatures.py). The cases that are added to docs/udf.rst should be removed from openeo/udf/udf_signatures.py I think to eliminate the duplication |
jdries
approved these changes
Dec 3, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #534
The UDF page deferred to
openeo.udf.udf_signaturesthroughautomodule, and that module cannot show bothapply_datacubeforms: it defines thexarray.DataArrayvariant second, so it shadows the deprecatedXarrayDataCubeone. Only the array form was ever rendered, which is why writing the choice asUnion[...]looked like the only way out.Proposed Changes
automoduleblock with the supported entrypoints written out:apply_datacubein both forms,apply_timeseries,apply_vectorcube,apply_metadataandapply_udf_data. Each comes with the annotations a UDF has to write and a line on when to use it.XarrayDataCubeform ofapply_datacubeis deprecated since 0.26.0 in favour of thexarray.DataArrayform, and keep the existing warning onapply_metadata.udf_signatures.pyexplaining why the deprecated stub is shadowed, so the module does not read as if the form had been dropped.The module stays as the source of executable stubs, and the page now says so at the end of the section.
Verification
python -m sphinx -b dummy docs docs/_buildreports no warnings fordocs/udf.rst, andpytest tests/udfpasses (122 passed, 6 skipped).