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

avoid "No cube:dimensions metadata" warning or errors from datacube_from_process #442

Closed
soxofaan opened this issue Jun 15, 2023 · 3 comments

Comments

@soxofaan
Copy link
Member

connection.datacube_from_process() causes

openeo-python-client/openeo/metadata.py:255: UserWarning: No cube:dimensions metadata
  complain("No cube:dimensions metadata")

which is not very helpful and can not be avoided because there is not really a way to provided expected metadata

datacube_from_process should not trigger that warning by default (or it should make it possible/easy to specify metadata)

@soxofaan
Copy link
Member Author

soxofaan commented Jul 6, 2023

another use case:

cube = connection.datacube_from_process(...
cube.apply_dimension(dimension="t", ...

fails with

ValueError: Invalid dimension 't'. Should be one of []

Now, the user is forced to explicitly add define the dimensions clientside in order to get the apply_dimension working. For example, between the datacube_from_process and apply_dimension:

from openeo.metadata import TemporalDimension
cube = cube.metadata._dimensions.append(TemporalDimension(name="t", extent=date))

I think it would be better to skip the client-side dimension checks when there is no metadata, as the backend will complain anyway if something is wrong

@soxofaan soxofaan changed the title avoid "No cube:dimensions metadata" warning from datacube_from_process avoid "No cube:dimensions metadata" warning or errors from datacube_from_process Jul 6, 2023
@soxofaan
Copy link
Member Author

soxofaan commented Sep 13, 2023

soxofaan added a commit that referenced this issue Sep 14, 2023
Allow alternative operation modes where less/no metadata is available
soxofaan added a commit that referenced this issue Sep 14, 2023
soxofaan added a commit that referenced this issue Sep 14, 2023
Allow alternative operation modes where less/no metadata is available
soxofaan added a commit that referenced this issue Sep 14, 2023
Allow alternative operation modes where less/no metadata is available
@soxofaan
Copy link
Member Author

merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant