-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: check none enddate in temporal validator #419
Conversation
|
||
@root_validator | ||
def check_dates(cls, v): | ||
if v["startdate"] >= v["enddate"]: | ||
if (v["enddate"] is not None) and (v["startdate"] >= v["enddate"]): |
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.
Since both start and end can be open in the spec (although not recommended) should we just allow it here, too?
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.
yeah good point, could have null for both start and end. I'll make a change
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.
Might need to watch the timing on the merge action for #431 before merging this one in
…lidation, add nlcd colormap (#434) **Breaking** feat(routes)!: remove cloudfront distribution and custom alternate domain from backend #422 **Added** feat(raster-api): added custom NLCD colormap #433 feat: add ecr endpoint #432 **Fixed** fix(tests): #425 fix(ingest): improved datetime validations #419 **Changed** ci: remove automated deployments to staging #438
Fix temporal validator in cases where a collection has a
null
enddate as per STAC spec: https://github.com/radiantearth/stac-spec/blob/master/collection-spec/collection-spec.md#temporal-extent-objectTested with the following dataset config: