Necessary commit to create summary of browser data if more than one browser bucket#70
Necessary commit to create summary of browser data if more than one browser bucket#70ErikBjare merged 2 commits intoActivityWatch:masterfrom nicolae-stroncea:allBrowserData
Conversation
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
==========================================
- Coverage 94.52% 94.12% -0.41%
==========================================
Files 31 31
Lines 1352 1362 +10
Branches 218 219 +1
==========================================
+ Hits 1278 1282 +4
- Misses 37 42 +5
- Partials 37 38 +1
Continue to review full report at Codecov.
|
johan-bjareholt
left a comment
There was a problem hiding this comment.
Please add a unit test as well, should be pretty easy.
aw_analysis/query2_functions.py
Outdated
| return sum_durations(events) | ||
|
|
||
| @q2_function | ||
| def q2_sum_event_lists(events1: list, events2: list) -> List[Event]: |
There was a problem hiding this comment.
sum_event_list is probably a bad name, this is rather appending two lists. It's also generic enough to not have to be a event_list so that shouldn't be a part of the name either.
Maybe name it merge_lists or append_lists?
There was a problem hiding this comment.
It's not generic as it sorts by timestamp. If you give it an object without that property, it'll trigger an attribute error. That said, the name should probably include the fact that it returns a sorted list
There was a problem hiding this comment.
In that case I wonder why does it do two things in one function? There's a seperate function for sorting by timestamp.
There was a problem hiding this comment.
Seems I somehow missed the sort_by_timestamp. I'll separate it into two functions.
|
Is this in progress? |
|
I'm having some issues merging. I'll look into them once midterm season is over. |
… to the namespace
|
Fixed the issues, merging now. |
No description provided.