Open-EO / Open-EO/openeo-python-client
Promote unit test based UDF development
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 217
- Forks
- 56
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
Writing UDFs can be cumbersome when your development cycle involves submitting your process graph to a real openEO backend.
Local UDF processing shortens the development cycle, but that is typically done with throw away experiments.
Even better would be to leverage unit tests, e.g. with test functions directly included the UDF python file.
In the python client we could provide some helpers to generate dummy data.
e.g. something like
def apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:
...
def test_apply_datacube():
cube = produce_dummy_data(..., desired bands, temporal resolution, ....)
result = apply_datacube(cube)
# check actual results against expectations
The user can then easily run the tests with something like pytest my_udf.py.
And maybe backends can even provide services to run the tests in their runtime environment
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Python client’s existing local UDF processing and testing support, then examine how a UDF file is executed with pytest. Define the dummy-data helper requirements for bands and temporal resolution, and clarify whether backend runtime test services are in scope. Done should include a documented way to run a UDF’s tests locally and verify the resulting data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100