Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema of return value of "callbacks" #350

Closed
soxofaan opened this issue Sep 9, 2020 · 1 comment · Fixed by #351
Closed

Schema of return value of "callbacks" #350

soxofaan opened this issue Sep 9, 2020 · 1 comment · Fixed by #351
Assignees
Labels
minor requires a minor-version (x.1.0 for example)
Milestone

Comments

@soxofaan
Copy link
Member

soxofaan commented Sep 9, 2020

We have a couple of processes that take a "callback" (I know we deprecated that term, but using it avoids confusion here I think), e.g.:

  • reduce_dimension has parameter "reducer": a callback that takes a data argument (type: array of any)
  • apply has parameter "process": a callback that takes a x argument (type: any)
  • apply_neighborhood has parameter "process": a callback that takes a data argument (type: rastercube)

Maybe this has been discussed before, but is there any reason we don't define the schema/type of what the callback should return?
For example:

  • for reduce_dimension: (array[any]) -> any
  • for apply: (any) -> any
  • for apply_neighborhood: (rastercube) -> rastercube
  • for count: (any) -> bool
@m-mohr
Copy link
Member

m-mohr commented Sep 15, 2020

Wow! That is indeed missing and never came up before, but is so integral. We need to add that for sure!

@m-mohr m-mohr transferred this issue from Open-EO/openeo-processes Dec 21, 2020
@m-mohr m-mohr added this to the 1.1.0 milestone Dec 21, 2020
@m-mohr m-mohr added the minor requires a minor-version (x.1.0 for example) label Dec 21, 2020
@m-mohr m-mohr self-assigned this Dec 21, 2020
@m-mohr m-mohr added breaking Breaking changes, requires a major-version (2.0.0 for example) and removed breaking Breaking changes, requires a major-version (2.0.0 for example) labels Dec 21, 2020
@m-mohr m-mohr linked a pull request Dec 21, 2020 that will close this issue
m-mohr added a commit to Open-EO/openeo-processes that referenced this issue Dec 21, 2020
m-mohr added a commit to Open-EO/openeo-processes that referenced this issue Dec 21, 2020
m-mohr added a commit to Open-EO/openeo-processes that referenced this issue Dec 21, 2020
m-mohr added a commit that referenced this issue Jan 4, 2021
@m-mohr m-mohr closed this as completed Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor requires a minor-version (x.1.0 for example)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants