Open-EO / Open-EO/openeo-python-client

second degree callback parameter detection

Open
#426 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api compliancy usability
Dominant language
Python
Stars
217
Forks
56
Avg merge
1d 22h
Merged PRs (30d)
2

Description

This came up when discussing https://github.com/Open-EO/openeo-geotrellis-extensions/issues/154 with @EmileSonneveld :

example snippet had something like:

cube = cube.apply_dimension(
    dimension="t", 
    process=lambda data: data.array_apply(lambda foo: foo + 1)
)

Note 2 orders of callbacks: array_apply(...) in apply_dimension and foo+1 in array_apply

Client creates process graph, where the array_apply process looks like:

                    "add1": {
                      "process_id": "add",
                      "arguments": {
                        "x": {
                          "from_parameter": "foo"
                        },
                        "y": 1
                      },

Note the "from_parameter": "foo", which should be "from_parameter": "x"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing callback parameter detection from apply_dimension into the nested array_apply callback shown in the example. Reproduce the generated process graph and verify that the inner foo reference is emitted as from_parameter "x" rather than "foo".

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.