-
Notifications
You must be signed in to change notification settings - Fork 43
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
Tick and tick calendar include left and right #376
Conversation
6c72287
to
1e937ab
Compare
ba27208
to
e16466c
Compare
@@ -41,14 +41,15 @@ def __call__(self, input: EventSet) -> Dict[str, EventSet]: | |||
|
|||
# fill output EventSet data | |||
for index_key, index_data in input.data.items(): | |||
if len(index_data.timestamps) == 0: | |||
if len(index_data.timestamps) <= 1: |
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.
For brainstorming: Should there be cases where at least one event is returned?
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.
Changed this, the behavior now is similar to what we have currently on main.
Check the new test: https://github.com/google/temporian/pull/376/files#diff-22438ae7b5327b043eb72f32e896dc62eb5c44d523d3535a0f3b65c1339894a1R57
ab36c41
to
9dae7ad
Compare
1e2eb6e
to
d06edf4
Compare
36818a8
to
8937bd7
Compare
Coverage reportMain: 91.32% | PR: 91.35% | Diff: 0.04 ✅ |
2 similar comments
Coverage reportMain: 91.32% | PR: 91.35% | Diff: 0.04 ✅ |
Coverage reportMain: 91.32% | PR: 91.35% | Diff: 0.04 ✅ |
8937bd7
to
a797c66
Compare
Coverage reportMain: 91.32% | PR: 91.35% | Diff: 0.04 ✅ |
Coverage reportMain: 91.57% | PR: 91.35% | Diff: -0.21 |
Had to change the end in tick because nextafter was not working for small values (in the -0.1-0 range)
- added examples using these params to docs - updated old examples - changed the behavior of tick when a single event is passed, the current behavior is more similar to the one before the new parameters - fixed a bug on tick_calendar with a single element - added tests for both operators testing the behavior for single-event inputs under different parameters - added test for empty eventset on tick_calendar - added changelog
c3df964
to
c6d70bc
Compare
True
by defaultFalse
by defaultChanged the behavior of the tick operator when input has 1 item, now it always returns an empty event set (used to return one element ifalign=False
and empty otherwise)Calendar ops needs to be merged first