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

Validate item times match collection periodicity when present #675

Merged
merged 29 commits into from
Apr 21, 2021

Conversation

jisantuc
Copy link
Contributor

@jisantuc jisantuc commented Apr 16, 2021

Overview

This pr links up collection extent periodicity with the validation changes introduced in #664. It doesn't work yet and has some unimplemented bits, but types line up and it's what things will look like ✨eventually✨.

Checklist

  • New tests have been added or existing tests have been modified

Notes

This wound up requiring changes in several places:

  • single item insert
  • bulk item insert (cli item import only)
  • item patch
  • item put

The function for checking alignment is a bit complicated, so I added a number of tests in PeriodAlignmentSpec.scala. There aren't tests for periods smaller than weeks. Because weeks, months, and years are the messiest cases, I focused there, and fortunately everything worked as expected. I'll demo at the weekly check-in tomorrow.

Testing Instructions

  • forthcoming

Closes #637

made some ad hoc choices here, like "items have to be point-in-time
items rather than time range items", but I think these make sense.
@jisantuc jisantuc marked this pull request as draft April 16, 2021 19:16
@jisantuc
Copy link
Contributor Author

CI's gonna fail until I get on a real stac4s -- it's on local publication from HEAD for me right now

@jisantuc jisantuc changed the title wip -- Validate item times match collection periodicity when present Validate item times match collection periodicity when present Apr 19, 2021
@jisantuc jisantuc marked this pull request as ready for review April 19, 2021 22:52
@jisantuc
Copy link
Contributor Author

468e301 addresses the issue discovered in demo today

Copy link
Contributor

@pomadchin pomadchin left a comment

Choose a reason for hiding this comment

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

Looks nice, lets merge it after the demo! 🚀

@jisantuc jisantuc merged commit 88478cf into master Apr 21, 2021
@jisantuc jisantuc deleted the feature/js/validate-periodicity branch April 21, 2021 17:08
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.

Validate periodic intervals on item post / update / patch
2 participants