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

Allow open date range in dataset search #1439

Merged
merged 6 commits into from May 10, 2023
Merged

Conversation

Ariana-B
Copy link
Contributor

@Ariana-B Ariana-B commented May 9, 2023

Reason for this pull request

See #1217

Proposed changes

  • Update Lark grammar to recognise '<' and '>' in search expression

  • Treat open ranges as a range from specified lower bound to today or from unix epoch to specified upper bound

  • Closes Support open-ended ranges in dataset search #1217

  • Tests added / passed

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


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

@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 33.33% and project coverage change: -0.08 ⚠️

Comparison is base (df7f48f) 91.84% compared to head (18c1f2c) 91.76%.

❗ Current head 18c1f2c differs from pull request most recent head 11e9dc6. Consider uploading reports for the commit 11e9dc6 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1439      +/-   ##
===========================================
- Coverage    91.84%   91.76%   -0.08%     
===========================================
  Files          132      132              
  Lines        14466    14483      +17     
===========================================
+ Hits         13286    13291       +5     
- Misses        1180     1192      +12     
Impacted Files Coverage Δ
datacube/ui/click.py 84.04% <ø> (ø)
datacube/api/query.py 90.27% <11.11%> (-3.45%) ⬇️
datacube/ui/expression.py 74.07% <55.55%> (-4.19%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Ariana-B Ariana-B requested a review from SpacemanPaul May 9, 2023 05:24
@robbibt
Copy link
Contributor

robbibt commented May 9, 2023

Hey @Ariana-B, this will be so useful! There's a stale/wontfix issue here from way back in 2017 proposing something similar - great to see it finally implemented!

Any chance of getting this documented on the ODC user guide dc.load API page so that future users will know about the functionality when they try to load datacube data? This feels like the kind of feature that might be easy to miss without being mentioned in the docs (that page really should mention that you can specify just a single value like "2023" as well).
https://datacube-core.readthedocs.io/en/latest/api/indexed-data/generate/datacube.Datacube.load.html#datacube.Datacube.load

image

@Ariana-B
Copy link
Contributor Author

Hey @robbibt, this PR doesn't affect dc.load, but happy to raise another PR!

@Ariana-B Ariana-B merged commit 72ccd88 into develop May 10, 2023
24 checks passed
@Ariana-B Ariana-B deleted the search_open_ranges branch May 10, 2023 06:58
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.

Support open-ended ranges in dataset search
3 participants