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

issue #693 add search for schema and find parameters from the backend #698

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ElienVandermaesenVITO
Copy link
Contributor

Copy link
Member

@soxofaan soxofaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this PR you add a lot of utility functions. A couple of notes on that:

  • they are al public at the moment, so adding them adds the burden to keep/maintain/support them. In that sense, they should also get good test coverage.
  • some of the seem quite tailored for the specific use case of this PR, while they are named very generically

also note that we already have parsing functionality for process definitions: e.g. see starting point openeo.internal.processes.Process.from_dict(). I think that should eliminate the need for all these new utility functions

I think it's also important that the core goal of this PR gets unit tests coverage

openeo/rest/connection.py Show resolved Hide resolved
openeo/rest/connection.py Show resolved Hide resolved
openeo/rest/connection.py Show resolved Hide resolved
"beta0", "sigma0-ellipsoid", "sigma0-terrain", "gamma0-ellipsoid", "gamma0-terrain", None
]
schema = self.connection.get_schema("sar_backscatter", "coefficient")
coefficient_options = search_list_for_dict_key(schema, "enum")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be fallbacks for several situations:

  • there is no connection (self.connection is None)
  • the backend does not provide an enum with possible coefficient values

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

Successfully merging this pull request may close these issues.

2 participants