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

data parameter for all and any processes #147

Closed
soxofaan opened this issue Mar 16, 2020 · 4 comments
Closed

data parameter for all and any processes #147

soxofaan opened this issue Mar 16, 2020 · 4 comments
Labels
help wanted Extra attention is needed
Milestone

Comments

@soxofaan
Copy link
Member

almost all processes under the "reducer" category of https://openeo.org/documentation/1.0/processes.html have data as first parameter (e.g. mean, max, sum, variance, ...)

exception are all and any , which use value instead. It would probably make things cleaner if they also use data instead

@m-mohr
Copy link
Member

m-mohr commented Mar 16, 2020

Depends on which category you look into (logic with the if process is the other one).

In general, I tried to follow the following "conventions":

  • data for all data cubes / numeric arrays
  • value(s) for all boolean value(s)
  • x/y for single values

So the difference is the data type stored in the arrays thus a different name.

I thought there are more processes with value(s) as parameter name, but it seems it's only if and any/all. So I'd be fine with using data in any/all and x (or something better) in if, but would leave this open for vote because I'd like to not break existing 1.0 implementations if there are any at the time we go RC2 or final.

@m-mohr m-mohr added this to the v1.0-final milestone Mar 16, 2020
@soxofaan
Copy link
Member Author

another reason to prefer data over value in the case of all/any: data implies being a collection of some sorts (array, list, dictionary, cube, ...), while value sounds a lot more "scalar" to me (int, float, string).

But anyway, it was just a small observation, I don't have strong feelings about this.

@m-mohr
Copy link
Member

m-mohr commented Mar 17, 2020

Don't take this as vote for one or the other, I just want to clarify: For any/all the name is "values" (it accepts multiple values) and only "if" uses "value" (it accepts a single value). So the plural should also imply a collection. And yes, it's scalars in that case (boolean), although this would also be true for numbers and for them it's data.

@m-mohr m-mohr added the help wanted Extra attention is needed label Mar 17, 2020
@m-mohr
Copy link
Member

m-mohr commented May 28, 2020

Looking at the Hub, only VITO and GEE implement any, all and/or if at the moment . So I guess it's mostly up to us to decide whether to change this or not, @soxofaan

I'm fine with renaming values to data in any/all and I think I'd leave if as it is. It's now up to VITO: #152

Edit: On the dev telco nobody else seemed to implement those processes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants