Skip to content

DataCube.save_result returns DataCube instead of (wrapped) true #402

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

Closed
soxofaan opened this issue Mar 24, 2023 · 6 comments · Fixed by #725
Closed

DataCube.save_result returns DataCube instead of (wrapped) true #402

soxofaan opened this issue Mar 24, 2023 · 6 comments · Fixed by #725

Comments

@soxofaan
Copy link
Member

related to #401, Open-EO/openeo-processes#334, Open-EO/openeo-processes#401

DataCube.save_result returns a DataCube, while it technically should return true (wrapped in _ProcessGraphAbstraction, to allow calling .download(), .create_job, ...)

@clausmichele
Copy link
Member

@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?

@soxofaan
Copy link
Member Author

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, ...

@clausmichele
Copy link
Member

Ok now I get it!

@soxofaan
Copy link
Member Author

having a dedicated "save_result" object will also simplify the save_result related checks and format guessing hacks from #401/#449

@m-mohr
Copy link
Member

m-mohr commented Sep 4, 2024

Note that it's planned that save_result changes from boolean return value to a STAC type:

Open-EO/openeo-processes#485

@jdries
Copy link
Collaborator

jdries commented Jan 31, 2025

This is also relevant for supporting export_workspace:
#720

soxofaan added a commit that referenced this issue Feb 10, 2025
soxofaan added a commit that referenced this issue Feb 10, 2025
soxofaan added a commit that referenced this issue Feb 10, 2025
soxofaan added a commit that referenced this issue Feb 11, 2025
soxofaan added a commit that referenced this issue Feb 11, 2025
use tests to enforce keeping docs in sync

related to #402/#720/#725
soxofaan added a commit that referenced this issue Feb 11, 2025
soxofaan added a commit that referenced this issue Feb 12, 2025
use tests to enforce keeping docs in sync

related to #402/#720/#725
soxofaan added a commit that referenced this issue Feb 12, 2025
use tests to enforce keeping docs in sync

related to #402/#720/#725
@soxofaan soxofaan linked a pull request Feb 12, 2025 that will close this issue
soxofaan added a commit that referenced this issue Feb 12, 2025
soxofaan added a commit that referenced this issue Feb 12, 2025
soxofaan added a commit that referenced this issue Feb 12, 2025
soxofaan added a commit that referenced this issue Feb 12, 2025
soxofaan added a commit that referenced this issue Feb 12, 2025
use tests to enforce keeping docs in sync

related to #402/#720/#725
soxofaan added a commit that referenced this issue Feb 13, 2025
use tests to enforce keeping docs in sync

related to #402/#720/#725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants