Open soxofaan opened 1 year ago
@soxofaan as far as I understand, the return value of save_result
mentioned is what the process should return when executed in the back-end, and not something that the client should take care of. @m-mohr do I understand it correctly?
This ticket is purely about the python client side:
The Python method DataCube.save_result
currently returns a (new) DataCube
instance, which allow the user to call things like aggregate_spatial
or reduce_dimension
on that:
cube = con.load_collection(...)
result = cube.save_result(...)
result = result.reduce_dimension(...)
which makes no sense (because the output of the save_result
openEO process is a boolean), so the client should not allow that.
Instead, the DataCube.save_result
should return something that still supports .download()
, .execute_batch()
and alike, but not allow all the data processing methods like aggregate_spatial
, ...
Ok now I get it!
having a dedicated "save_result" object will also simplify the save_result related checks and format guessing hacks from #401/#449
related to #401, https://github.com/Open-EO/openeo-processes/issues/334, https://github.com/Open-EO/openeo-processes/pull/401
DataCube.save_result
returns a DataCube, while it technically should returntrue
(wrapped in_ProcessGraphAbstraction
, to allow calling.download()
,.create_job
, ...)