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

Inconsistencies in processes (based on pydantic tests) #318

Closed
m-mohr opened this issue Jan 14, 2022 · 4 comments
Closed

Inconsistencies in processes (based on pydantic tests) #318

m-mohr opened this issue Jan 14, 2022 · 4 comments
Labels
question Further information is requested

Comments

@m-mohr
Copy link
Member

m-mohr commented Jan 14, 2022

We created Pydantic Classes from the OpenEO API JSON process graph specification and tested them against the standard processes (from https://raw.githubusercontent.com/Open-EO/openeo-processes/1.x.0/)
We found that ['array_apply', 'array_filter'] use
schema": [ {"type": "number"}, . . . {"type": "null"}
instead of
"schema": { "type": ["number", "string", "null"]}

So,

  1. Is there any interest in discussing this matter?
  2. What would be the consequences of updating the standard processes accordingly?
  3. Maybe the tests and models are of interest?

Running the tests against other lists of standard processes reveals other inconsistencies. Not sure how to proceed here in a way that benefits all. PS. the reason we used Pydantic is that FastAPI gives us automatic checking of the API parameters)

Originally posted by @danielFlemstrom in #204 (comment)

@m-mohr
Copy link
Member Author

m-mohr commented Jan 14, 2022

Hey @danielFlemstrom,

I'm a bit confused and I think I need a bit more context here.

  • It seems the terminology is a bit off here. Did you create pydantic classes for the openEO process schema? Because I'm not exactly sure how you could validate processes against a process graph schema.
  • Yes, processes use different ways to make schemas available (schema vs. array of schemas). It depends on the use case and the data types that will be made available. Especially, we don't try to conflate different basic data types (except for null) so that data types can be described clearly and unambiguous. Both options shown above are valid.
  • Regarding your three points:
    1. Yes.
    2. I'm not sure exactly what you want to align and why.
    3. Not sure yet, I'm not using Python a lot right now. It seems they would need some fine-tuning though.
  • We try to minimize inconsistencies, but it might be that not all things that look like inconsistencies are really inconsistencies. I'm happy to discuss though. I'd hope to spot things that we can improve. How can I access the results of these tests?

@m-mohr m-mohr added the question Further information is requested label Jan 14, 2022
@danielFlemstrom
Copy link

danielFlemstrom commented Jan 17, 2022 via email

@m-mohr
Copy link
Member Author

m-mohr commented Jan 17, 2022

Happy to join a Teams of Zoom session. That seems indeed like the most efficient way. I'm pretty flexible with meeting slots this week (e.g. today until 4), you could just send an invite. My e-mail address is in my GitHub profile. Thank you!

@m-mohr
Copy link
Member Author

m-mohr commented Jan 27, 2022

Clarified the issues on a video call. Thank you again for your contribution.

@m-mohr m-mohr closed this as completed Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants