-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: add comparison processes #50
feat: add comparison processes #50
Conversation
Codecov Report
@@ Coverage Diff @@
## main #50 +/- ##
==========================================
+ Coverage 75.05% 76.46% +1.40%
==========================================
Files 23 24 +1
Lines 886 956 +70
==========================================
+ Hits 665 731 +66
- Misses 221 225 +4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, only comment would be to try and exhaust all conditional cases. Not so familiar with the processes at this point, but the test set up looks good!
What's the status of this PR? Can I help to proceed with this? |
Let's look into this after the SRR! |
…ithub.com/Open-EO/openeo-processes-dask into EODCAPI-184-complete-comparison-processes
or isinstance(y, bool) | ||
and not isinstance(x, bool) | ||
): | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now added this check to make sure that the example of eq(x = 0, y = false) => false works, but there is one problem left:
I do this check for inputs that only consist of one value, e.g. int, float, bool. As soon as I want to do this for an array and check if it is a bool array, it might not work, because numpy easily converts a bool array into a float array. In that case, False would be set to 0 and the example would not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LukeWeidenwalker I tried implementing the eq(x = 0, y = false) => false example with an explicit check for the bool type if the input value only consists of one number - as soon as there are numpy or dask arrays, I would not check it explicitely, is this fine for you? or should I add a check for the numpy array dtype?
The current version shows one problem that now occured, as I tested |
Btw, I just realised, comparison of temporal stuff is deprecated with 2.0: Open-EO/PSC#21, so we don't need to bother implementing this! :) |
Ah, thanks for pointing this out, then I will quickly update the check for the datetime again! |
Hi @ValentinaHutter and @LukeWeidenwalker, today it would be the last day to merge and make available the comparison processes and let me prepare the notebook for Monday |
Yesterday was a public holiday in Austria, so I just saw this! @ValentinaHutter made more changes to this on Wednesday, which I'll review and iterate on again today. However, I don't think you really need us to merge&release these changes to use them. If you're happy with the current level of implementation, couldn't you just grab the code and stick it into your process registry manually? |
Unfortunately it's not a viable option, I would have to ask 20+ users to install a non released version from source and I wouldn't have the time for testing it now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValentinaHutter I've made a few more changes, and found another bug in merge_cubes! Just FYI, not_null
wasn't dask-friendly yet, so now I was able to replace da.where
with np.where
again.
Think this looks good now, thanks for adding all the tests, these were really useful to have in place already! :)
@clausmichele: I'll merge this now and cut a release for you to use in your demo!
No description provided.