-
Notifications
You must be signed in to change notification settings - Fork 48
feat: Floor datetimes on ingestion #2146
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
Open
BelhsanHmida
wants to merge
30
commits into
main
Choose a base branch
from
mohamed/dev/floor-event-start
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8edbf8a
feat: start test cases for deserializing time series data to BeliefsD…
Flix6x 3b2770f
fix: update type annotation
Flix6x 34a2dc5
feat: handle resampling after converting to a BeliefsDataFrame
Flix6x 8d2d2d3
fix: catch NotImplementedError to fix failing test
Flix6x 86ad774
feat: two more test cases
Flix6x 30fb2ad
fix: update test expectations
Flix6x 7f0caa1
Merge branch 'main' into mohamed/dev/floor-event-start
BelhsanHmida 6c08284
fix: floor direct POST sensor data starts
BelhsanHmida f590e58
fix: floor uploaded sensor data datetimes
BelhsanHmida 0566ceb
fix: floor flex-model scheduling datetimes
BelhsanHmida 4afd828
Merge remote-tracking branch 'origin/main' into mohamed/dev/floor-eve…
BelhsanHmida a857806
fix: preserve 422 validation for invalid flex-model datetimes
BelhsanHmida f30429c
style: apply pre-commit
BelhsanHmida 3a56e0c
fix: return 422 for invalid flex-model timed-event datetimes
Copilot dd2fcc4
test: refine invalid flex-model datetime regression assertion
Copilot aa93fe1
test: make flex-model datetime error assertion less brittle
Copilot e0f88a8
test: assert error payload shape for invalid flex-model datetime
Copilot aaebfaa
refactor: simplify test, incl. by not mixing timezone offsets
Flix6x 43fe0b5
refactor: rename variable to match variable name in test_trigger_sche…
Flix6x 9624f09
refactor: use search method over writing custom query
Flix6x 860c700
feat: test resampling from 5 to 15 minutes
Flix6x 2228410
docs: document flex-model datetime flooring helper
BelhsanHmida 0d92e52
test: clarify sensor_index assumptions in upload tests
BelhsanHmida b7d3cf0
feat: handle floored downsampling posts
BelhsanHmida 531d2db
test: cover datetime flooring opt-out
BelhsanHmida 067bd92
fix: reject flooring event collisions
BelhsanHmida fa31e0e
docs: document datetime flooring attribute
BelhsanHmida cd4cfd2
docs: add changelog entry
BelhsanHmida d4e56bc
Merge branch 'main' into mohamed/dev/floor-event-start
BelhsanHmida c66b334
Merge remote-tracking branch 'origin/main' into mohamed/dev/floor-eve…
BelhsanHmida File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What is the historical purpose of this attribute? How does that relate to the new functionality?
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 looked into this a bit more. The historical purpose of frequency seems to be to align incoming measurements to a configured Pandas frequency by rounding. That is useful when a sensor stores instantaneous data, where
event_resolutionis zero, but we still want incoming point measurements to land on a predictable time grid.This PR adds a different behavior for non-instantaneous sensors. For those, the sensor already has an interval grid through
event_resolution, so off-clock starts are floored to that resolution before saving. So they are related in that both normalize incoming datetimes, but frequency is a custom rounding grid, while the new behavior is flooring to the sensor’s own event resolution.I renamed the new flag to
floor_datetimes_to_resolutionto avoid mixing up those two concepts, and documented the distinction.