-
Notifications
You must be signed in to change notification settings - Fork 24
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 support for non-ellipsis open date windows #103
Add support for non-ellipsis open date windows #103
Conversation
Codecov Report
@@ Coverage Diff @@
## master #103 +/- ##
==========================================
+ Coverage 96.19% 96.21% +0.01%
==========================================
Files 20 20
Lines 473 475 +2
==========================================
+ Hits 455 457 +2
Misses 18 18
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
e90090c
to
258e7ed
Compare
258e7ed
to
73cfc21
Compare
stac_pydantic/api/search.py
Outdated
if value == "..": | ||
dates.append(value) | ||
continue | ||
elif value == "": | ||
dates.append("..") | ||
continue |
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 think this might be clearer as:
if value == "..": | |
dates.append(value) | |
continue | |
elif value == "": | |
dates.append("..") | |
continue | |
if value == ".." or value == "": | |
dates.append(value) | |
continue |
I don't know if this is a regular thing to do but I tend to interpret the branches as different behaviors that should occur. Naturally feel free to take or leave this one
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.
Seems sensible to me!
STAC Pydantic currently supports open datetime windows with ellipsis ("DATETIME/.." or "../DATETIME") but it appears as though it ought to also support datetimes with non-ellipsis open windows too. Such windows have the form "/DATETIME" or "DATETIME/". This PR corrects that oversight.