-
Notifications
You must be signed in to change notification settings - Fork 175
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
Replace CLI Search Expressions #840
Conversation
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.
Nice, much simpler! 👍
datacube/scripts/dataset.py
Outdated
Delete Dataset(s) from the database | ||
|
||
Easy if they have nothing derived from them. | ||
""" |
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.
Accidental inclusion? (empty stub methods)
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.
Whoops, thanks, yep. I'll clean it up. :)
Codecov Report
@@ Coverage Diff @@
## develop #840 +/- ##
===========================================
+ Coverage 88.63% 88.66% +0.03%
===========================================
Files 112 112
Lines 10381 10270 -111
===========================================
- Hits 9201 9106 -95
+ Misses 1180 1164 -16
Continue to review full report at Codecov.
|
datacube/scripts/product.py
Outdated
|
||
If the product does have Datasets, suggest how to delete the datasets. | ||
|
||
""" |
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.
more accidental stub commits?
In some places the literal '2019' was interpreted as a datetime(2019, 1, 1) and in others as the int 2019.dra/use-larkparser I think it should be made consistent, rather than trying to maintain backwards compatibility.
Flip pytest asserts to be the correct way, like assert f() == 4 See https://docs.pytest.org/en/latest/assert.html This makes the error messages much less concerning wrt expected/actual labels
improvements to parse_expressions using lark
Remove PyPEG2 dependency
Return an empty dict
434113b
to
8d7c79e
Compare
Reason for this pull request
I would like to replace the search expressions used in several datacube command line tools with a more manageable and understandable alternative.
The existing search expressions have confused a few new users, they have grown since initially implemented, but haven't had old options removed. The implementation is also based on PyPEG2, a no longer supported or updated parsing library. Due to it's rarity, this dependency has created several dependency graph issues with datacube in conda-forge.
Proposed changes
in range()
syntax, which also required shell escaping, and wasn't clear whether it supported single or multiple dates or only numbers.Available Search Expressions
Thanks @uchchwhash for a lot of the hard work!
docs/about/whats_new.rst
for all changes