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

add "Not" operator #1563

Merged
merged 4 commits into from Mar 14, 2024
Merged

add "Not" operator #1563

merged 4 commits into from Mar 14, 2024

Conversation

Ariana-B
Copy link
Contributor

@Ariana-B Ariana-B commented Mar 13, 2024

Reason for this pull request

See #1560

Proposed changes

  • Query terms are "OR"ed if provided as a list of values; there is no inbuilt type that could similarly be used to infer a "NOT", so create a custom Not type similarly to Range

  • Create generic NotExpression similarly to OrExpression

  • Closes "NOT" operator for ODC queries #1560

  • Tests added / passed

  • Fully documented, including docs/about/whats_new.rst for all changes


📚 Documentation preview 📚: https://datacube-core--1563.org.readthedocs.build/en/1563/

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.78%. Comparing base (bfb8417) to head (0b550ad).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1563   +/-   ##
========================================
  Coverage    91.77%   91.78%           
========================================
  Files          132      132           
  Lines        14631    14641   +10     
========================================
+ Hits         13428    13438   +10     
  Misses        1203     1203           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@SpacemanPaul SpacemanPaul left a comment

Choose a reason for hiding this comment

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

Mostly looks great, but as noted I don't like the name NotType - can we just call it Not?

datacube/model/_base.py Outdated Show resolved Hide resolved
@SpacemanPaul SpacemanPaul self-requested a review March 14, 2024 00:33
Copy link
Contributor

@SpacemanPaul SpacemanPaul left a comment

Choose a reason for hiding this comment

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

Conditional approval.

@Ariana-B Ariana-B merged commit b6cebf5 into develop Mar 14, 2024
31 checks passed
@Ariana-B Ariana-B deleted the not_expression branch March 14, 2024 02:34
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.

"NOT" operator for ODC queries
2 participants