You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case of resample_spatial however, we do always add the align parameter with default value "upper-left"
I think this should be changed. It should only be sent if not the default value and supported by the back-end.
A lot of DataCube methods adapted the default argument values from openeo-processes specs.
For example cube.resample_spatial() (without explicit align arg) will silently set align="upper-left" in the resulting process graph.
This has some subtle effects:
if a back-end chooses a different default value than the "official" specs, this will not be picked up automatically unless the user manages to unset the argument in the process graph in some way (which in the resample_spatial example above would be pretty ugly to do)
if a backend chooses not to support an argument, it will still receive it from the python client, which might break back-end side validation. Again, it is pretty ugly to workaround this.
So, it should be a general rule on DataCube methods to only adapt explicitly specified method arguments as process arguments in the process graph.
The text was updated successfully, but these errors were encountered:
A counter argument to consider: the current approach allows the python docs to list the default values in a standardized way as method argument defaults. If this is dropped, it will be more work for the end user to discover the actual default values.
Note: I'm also not buying the original reasoning that triggered this. If a backend only supports one of the values in an enum based argument, it makes sense for me to list that single value rather than drop the entire argument.
from Open-EO/openeo-processes-dask#103 (comment)
A lot of
DataCube
methods adapted the default argument values from openeo-processes specs.For example
cube.resample_spatial()
(without explicitalign
arg) will silently setalign="upper-left"
in the resulting process graph.This has some subtle effects:
resample_spatial
example above would be pretty ugly to do)So, it should be a general rule on
DataCube
methods to only adapt explicitly specified method arguments as process arguments in the process graph.The text was updated successfully, but these errors were encountered: