Add calories features tests

pull/131/head
JulioV 2021-04-20 12:02:21 -04:00
parent 9c56422529
commit 0e127e4412
42 changed files with 418 additions and 18 deletions

View File

@ -211,3 +211,34 @@ Due to the difference in the format of the raw battery data for iOS and Android
`plugin_studentlife_audio_raw.csv` respectively). `plugin_studentlife_audio_raw.csv` respectively).
- Finally, there are also additional empty data files for both - Finally, there are also additional empty data files for both
android and iOS for testing empty data files android and iOS for testing empty data files
## Fitbit Calories Intraday
Description
- A five-minute sedentary episode on Fri 11:00:00
- A one-minute sedentary episode on Sun 02:00:00. It exists in November but not in February in STZ
- A five-minute sedentary episode on Fri 11:58:00. It is split within two 30-min segments and the morning
- A three-minute lightly active episode on Fri 11:10:00, a one-minute at 11:18:00 and a one-minute 11:24:00. These check for start and end times of first/last/longest episode
- A three-minute fairly active episode on Fri 11:40:00, a one-minute at 11:48:00 and a one-minute 11:54:00. These check for start and end times of first/last/longest episode
- A three-minute very active episode on Fri 12:10:00, a one-minute at 12:18:00 and a one-minute 12:24:00. These check for start and end times of first/last/longest episode
- A eight-minute MVPA episode with intertwined fairly and very active rows on Fri 12:30:00
- The above episodes contain six higmet (>= 3 MET) episodes and nine lowmet episodes.
- One two-minute sedentary episode with a 1-minute row on Sun 09:00:00 and another on Sun 12:01:01 that are considering a single episode in multi-timezone event segments to showcase how inferring time zone data for Fitbit from phone data can produce inaccurate results around the tz change. This happens because the device was on LA time until 11:59 and switched to NY time at 12pm, in terms of actual time 09 am LA and 12 pm NY represent the same moment in time so 09:00 LA and 12:01 NY are consecutive minutes.
- A three-minute sedentary episode on Sat 08:59 that will be ignored for multi-timezone event segments.
- A three-minute sedentary episode on Sat 12:59 of which the first minute will be ignored for multi-timezone event segments since the test segment starts at 13:00
- A three-minute sedentary episode on Sat 16:00
- A four-minute sedentary episode on Sun 10:01 that will be ignored for Novembers's multi-timezone event segments since the test segment ends at 10am on that weekend.
- A three-minute very active episode on Sat 16:03. This episode and the one at 16:00 are counted as one for lowmet episodes
Checklist
|time segment| single tz | multi tz|platform|
|-|-|-|-|
|30min|OK|OK|fitbit|
|morning|OK|OK|fitbit|
|daily|OK|OK|fitbit|
|threeday|OK|OK|fitbit|
|weekend|OK|OK|fitbit|
|beforeMarchEvent|OK|OK|fitbit|
|beforeNovemberEvent|OK|OK|fitbit|

View File

@ -80,9 +80,7 @@ The following is a simple guide to run RAPIDS' tests. All files necessary for te
|threeday|OK|OK|android and iOS| |threeday|OK|OK|android and iOS|
|weekend|OK|OK|android and iOS| |weekend|OK|OK|android and iOS|
|beforeMarchEvent|OK|OK|android and iOS| |beforeMarchEvent|OK|OK|android and iOS|
|afterMarchEvent|OK|OK|android and iOS|
|beforeNovemberEvent|OK|OK|android and iOS| |beforeNovemberEvent|OK|OK|android and iOS|
|afterNovemberEvent|OK|OK|android and iOS|
??? check "**Add raw input data.**" ??? check "**Add raw input data.**"

View File

@ -0,0 +1,101 @@
timestamp,device_id,level,mets,value,local_date_time
0,fitbit,0,1.0,2.0,2020-03-06 11:00:00
0,fitbit,0,1.0,2.0,2020-03-06 11:01:00
0,fitbit,0,1.0,2.0,2020-03-06 11:02:00
0,fitbit,0,1.0,2.0,2020-03-06 11:04:00
0,fitbit,0,1.0,2.0,2020-03-06 11:05:00
0,fitbit,1,1.0,5.0,2020-03-06 11:10:00
0,fitbit,1,2.0,4.0,2020-03-06 11:11:00
0,fitbit,1,3.0,3.0,2020-03-06 11:12:00
0,fitbit,1,2.0,6.0,2020-03-06 11:18:00
0,fitbit,1,2.0,7.0,2020-03-06 11:24:00
0,fitbit,2,11.0,50.0,2020-03-06 11:40:00
0,fitbit,2,12.0,40.0,2020-03-06 11:41:00
0,fitbit,2,13.0,30.0,2020-03-06 11:42:00
0,fitbit,2,12.0,60.0,2020-03-06 11:48:00
0,fitbit,2,12.0,70.0,2020-03-06 11:54:00
0,fitbit,0,1.0,2.0,2020-03-06 11:58:00
0,fitbit,0,1.0,2.0,2020-03-06 11:59:00
0,fitbit,0,1.0,2.0,2020-03-06 12:00:00
0,fitbit,0,1.0,2.0,2020-03-06 12:01:00
0,fitbit,0,1.0,2.0,2020-03-06 12:02:00
0,fitbit,3,1.0,5.0,2020-03-06 12:10:00
0,fitbit,3,2.0,4.0,2020-03-06 12:11:00
0,fitbit,3,3.0,3.0,2020-03-06 12:12:00
0,fitbit,3,2.0,6.0,2020-03-06 12:18:00
0,fitbit,3,2.0,7.0,2020-03-06 12:24:00
0,fitbit,3,1.0,1.0,2020-03-06 12:30:00
0,fitbit,2,2.0,2.0,2020-03-06 12:31:00
0,fitbit,2,3.0,3.0,2020-03-06 12:32:00
0,fitbit,3,4.0,4.0,2020-03-06 12:34:00
0,fitbit,2,5.0,5.0,2020-03-06 12:37:00
0,fitbit,0,1.0,2.0,2020-03-07 08:59:00
0,fitbit,0,1.0,2.0,2020-03-07 09:00:00
0,fitbit,0,1.0,2.0,2020-03-07 09:01:00
0,fitbit,0,1.0,2.0,2020-03-07 12:59:00
0,fitbit,0,1.0,2.0,2020-03-07 13:00:00
0,fitbit,0,1.0,2.0,2020-03-07 13:01:00
0,fitbit,0,1.0,2.0,2020-03-07 16:00:00
0,fitbit,0,1.0,2.0,2020-03-07 16:01:00
0,fitbit,0,1.0,2.0,2020-03-07 16:02:00
0,fitbit,3,1.0,2.0,2020-03-07 16:03:00
0,fitbit,3,1.0,2.0,2020-03-07 16:04:00
0,fitbit,3,1.0,2.0,2020-03-07 16:05:00
0,fitbit,0,1.0,2.0,2020-03-08 02:00:00
0,fitbit,0,1.0,2.0,2020-03-08 02:01:00
0,fitbit,0,1.0,2.0,2020-03-08 09:00:00
0,fitbit,0,1.0,2.0,2020-03-08 12:01:00
0,fitbit,0,1.0,2.0,2020-03-08 10:01:00
0,fitbit,0,1.0,2.0,2020-03-08 10:02:00
0,fitbit,0,1.0,2.0,2020-03-08 10:03:00
0,fitbit,0,1.0,2.0,2020-03-08 10:04:00
0,fitbit,0,1.0,2.0,2020-10-30 11:00:00
0,fitbit,0,1.0,2.0,2020-10-30 11:01:00
0,fitbit,0,1.0,2.0,2020-10-30 11:02:00
0,fitbit,0,1.0,2.0,2020-10-30 11:04:00
0,fitbit,0,1.0,2.0,2020-10-30 11:05:00
0,fitbit,1,1.0,5.0,2020-10-30 11:10:00
0,fitbit,1,2.0,4.0,2020-10-30 11:11:00
0,fitbit,1,3.0,3.0,2020-10-30 11:12:00
0,fitbit,1,2.0,6.0,2020-10-30 11:18:00
0,fitbit,1,2.0,7.0,2020-10-30 11:24:00
0,fitbit,2,11.0,50.0,2020-10-30 11:40:00
0,fitbit,2,12.0,40.0,2020-10-30 11:41:00
0,fitbit,2,13.0,30.0,2020-10-30 11:42:00
0,fitbit,2,12.0,60.0,2020-10-30 11:48:00
0,fitbit,2,12.0,70.0,2020-10-30 11:54:00
0,fitbit,0,1.0,2.0,2020-10-30 11:58:00
0,fitbit,0,1.0,2.0,2020-10-30 11:59:00
0,fitbit,0,1.0,2.0,2020-10-30 12:00:00
0,fitbit,0,1.0,2.0,2020-10-30 12:01:00
0,fitbit,0,1.0,2.0,2020-10-30 12:02:00
0,fitbit,3,1.0,5.0,2020-10-30 12:10:00
0,fitbit,3,2.0,4.0,2020-10-30 12:11:00
0,fitbit,3,3.0,3.0,2020-10-30 12:12:00
0,fitbit,3,2.0,6.0,2020-10-30 12:18:00
0,fitbit,3,2.0,7.0,2020-10-30 12:24:00
0,fitbit,3,1.0,1.0,2020-10-30 12:30:00
0,fitbit,2,2.0,2.0,2020-10-30 12:31:00
0,fitbit,2,3.0,3.0,2020-10-30 12:32:00
0,fitbit,3,4.0,4.0,2020-10-30 12:34:00
0,fitbit,2,5.0,5.0,2020-10-30 12:37:00
0,fitbit,0,1.0,2.0,2020-10-31 08:59:00
0,fitbit,0,1.0,2.0,2020-10-31 09:00:00
0,fitbit,0,1.0,2.0,2020-10-31 09:01:00
0,fitbit,0,1.0,2.0,2020-10-31 12:59:00
0,fitbit,0,1.0,2.0,2020-10-31 13:00:00
0,fitbit,0,1.0,2.0,2020-10-31 13:01:00
0,fitbit,0,1.0,2.0,2020-10-31 16:00:00
0,fitbit,0,1.0,2.0,2020-10-31 16:01:00
0,fitbit,0,1.0,2.0,2020-10-31 16:02:00
0,fitbit,3,1.0,2.0,2020-10-31 16:03:00
0,fitbit,3,1.0,2.0,2020-10-31 16:04:00
0,fitbit,3,1.0,2.0,2020-10-31 16:05:00
0,fitbit,0,1.0,2.0,2020-11-01 02:00:00
0,fitbit,0,1.0,2.0,2020-11-01 02:01:00
0,fitbit,0,1.0,2.0,2020-11-01 09:00:00
0,fitbit,0,1.0,2.0,2020-11-01 12:01:00
0,fitbit,0,1.0,2.0,2020-11-01 10:01:00
0,fitbit,0,1.0,2.0,2020-11-01 10:02:00
0,fitbit,0,1.0,2.0,2020-11-01 10:03:00
0,fitbit,0,1.0,2.0,2020-11-01 10:04:00
1 timestamp device_id level mets value local_date_time
2 0 fitbit 0 1.0 2.0 2020-03-06 11:00:00
3 0 fitbit 0 1.0 2.0 2020-03-06 11:01:00
4 0 fitbit 0 1.0 2.0 2020-03-06 11:02:00
5 0 fitbit 0 1.0 2.0 2020-03-06 11:04:00
6 0 fitbit 0 1.0 2.0 2020-03-06 11:05:00
7 0 fitbit 1 1.0 5.0 2020-03-06 11:10:00
8 0 fitbit 1 2.0 4.0 2020-03-06 11:11:00
9 0 fitbit 1 3.0 3.0 2020-03-06 11:12:00
10 0 fitbit 1 2.0 6.0 2020-03-06 11:18:00
11 0 fitbit 1 2.0 7.0 2020-03-06 11:24:00
12 0 fitbit 2 11.0 50.0 2020-03-06 11:40:00
13 0 fitbit 2 12.0 40.0 2020-03-06 11:41:00
14 0 fitbit 2 13.0 30.0 2020-03-06 11:42:00
15 0 fitbit 2 12.0 60.0 2020-03-06 11:48:00
16 0 fitbit 2 12.0 70.0 2020-03-06 11:54:00
17 0 fitbit 0 1.0 2.0 2020-03-06 11:58:00
18 0 fitbit 0 1.0 2.0 2020-03-06 11:59:00
19 0 fitbit 0 1.0 2.0 2020-03-06 12:00:00
20 0 fitbit 0 1.0 2.0 2020-03-06 12:01:00
21 0 fitbit 0 1.0 2.0 2020-03-06 12:02:00
22 0 fitbit 3 1.0 5.0 2020-03-06 12:10:00
23 0 fitbit 3 2.0 4.0 2020-03-06 12:11:00
24 0 fitbit 3 3.0 3.0 2020-03-06 12:12:00
25 0 fitbit 3 2.0 6.0 2020-03-06 12:18:00
26 0 fitbit 3 2.0 7.0 2020-03-06 12:24:00
27 0 fitbit 3 1.0 1.0 2020-03-06 12:30:00
28 0 fitbit 2 2.0 2.0 2020-03-06 12:31:00
29 0 fitbit 2 3.0 3.0 2020-03-06 12:32:00
30 0 fitbit 3 4.0 4.0 2020-03-06 12:34:00
31 0 fitbit 2 5.0 5.0 2020-03-06 12:37:00
32 0 fitbit 0 1.0 2.0 2020-03-07 08:59:00
33 0 fitbit 0 1.0 2.0 2020-03-07 09:00:00
34 0 fitbit 0 1.0 2.0 2020-03-07 09:01:00
35 0 fitbit 0 1.0 2.0 2020-03-07 12:59:00
36 0 fitbit 0 1.0 2.0 2020-03-07 13:00:00
37 0 fitbit 0 1.0 2.0 2020-03-07 13:01:00
38 0 fitbit 0 1.0 2.0 2020-03-07 16:00:00
39 0 fitbit 0 1.0 2.0 2020-03-07 16:01:00
40 0 fitbit 0 1.0 2.0 2020-03-07 16:02:00
41 0 fitbit 3 1.0 2.0 2020-03-07 16:03:00
42 0 fitbit 3 1.0 2.0 2020-03-07 16:04:00
43 0 fitbit 3 1.0 2.0 2020-03-07 16:05:00
44 0 fitbit 0 1.0 2.0 2020-03-08 02:00:00
45 0 fitbit 0 1.0 2.0 2020-03-08 02:01:00
46 0 fitbit 0 1.0 2.0 2020-03-08 09:00:00
47 0 fitbit 0 1.0 2.0 2020-03-08 12:01:00
48 0 fitbit 0 1.0 2.0 2020-03-08 10:01:00
49 0 fitbit 0 1.0 2.0 2020-03-08 10:02:00
50 0 fitbit 0 1.0 2.0 2020-03-08 10:03:00
51 0 fitbit 0 1.0 2.0 2020-03-08 10:04:00
52 0 fitbit 0 1.0 2.0 2020-10-30 11:00:00
53 0 fitbit 0 1.0 2.0 2020-10-30 11:01:00
54 0 fitbit 0 1.0 2.0 2020-10-30 11:02:00
55 0 fitbit 0 1.0 2.0 2020-10-30 11:04:00
56 0 fitbit 0 1.0 2.0 2020-10-30 11:05:00
57 0 fitbit 1 1.0 5.0 2020-10-30 11:10:00
58 0 fitbit 1 2.0 4.0 2020-10-30 11:11:00
59 0 fitbit 1 3.0 3.0 2020-10-30 11:12:00
60 0 fitbit 1 2.0 6.0 2020-10-30 11:18:00
61 0 fitbit 1 2.0 7.0 2020-10-30 11:24:00
62 0 fitbit 2 11.0 50.0 2020-10-30 11:40:00
63 0 fitbit 2 12.0 40.0 2020-10-30 11:41:00
64 0 fitbit 2 13.0 30.0 2020-10-30 11:42:00
65 0 fitbit 2 12.0 60.0 2020-10-30 11:48:00
66 0 fitbit 2 12.0 70.0 2020-10-30 11:54:00
67 0 fitbit 0 1.0 2.0 2020-10-30 11:58:00
68 0 fitbit 0 1.0 2.0 2020-10-30 11:59:00
69 0 fitbit 0 1.0 2.0 2020-10-30 12:00:00
70 0 fitbit 0 1.0 2.0 2020-10-30 12:01:00
71 0 fitbit 0 1.0 2.0 2020-10-30 12:02:00
72 0 fitbit 3 1.0 5.0 2020-10-30 12:10:00
73 0 fitbit 3 2.0 4.0 2020-10-30 12:11:00
74 0 fitbit 3 3.0 3.0 2020-10-30 12:12:00
75 0 fitbit 3 2.0 6.0 2020-10-30 12:18:00
76 0 fitbit 3 2.0 7.0 2020-10-30 12:24:00
77 0 fitbit 3 1.0 1.0 2020-10-30 12:30:00
78 0 fitbit 2 2.0 2.0 2020-10-30 12:31:00
79 0 fitbit 2 3.0 3.0 2020-10-30 12:32:00
80 0 fitbit 3 4.0 4.0 2020-10-30 12:34:00
81 0 fitbit 2 5.0 5.0 2020-10-30 12:37:00
82 0 fitbit 0 1.0 2.0 2020-10-31 08:59:00
83 0 fitbit 0 1.0 2.0 2020-10-31 09:00:00
84 0 fitbit 0 1.0 2.0 2020-10-31 09:01:00
85 0 fitbit 0 1.0 2.0 2020-10-31 12:59:00
86 0 fitbit 0 1.0 2.0 2020-10-31 13:00:00
87 0 fitbit 0 1.0 2.0 2020-10-31 13:01:00
88 0 fitbit 0 1.0 2.0 2020-10-31 16:00:00
89 0 fitbit 0 1.0 2.0 2020-10-31 16:01:00
90 0 fitbit 0 1.0 2.0 2020-10-31 16:02:00
91 0 fitbit 3 1.0 2.0 2020-10-31 16:03:00
92 0 fitbit 3 1.0 2.0 2020-10-31 16:04:00
93 0 fitbit 3 1.0 2.0 2020-10-31 16:05:00
94 0 fitbit 0 1.0 2.0 2020-11-01 02:00:00
95 0 fitbit 0 1.0 2.0 2020-11-01 02:01:00
96 0 fitbit 0 1.0 2.0 2020-11-01 09:00:00
97 0 fitbit 0 1.0 2.0 2020-11-01 12:01:00
98 0 fitbit 0 1.0 2.0 2020-11-01 10:01:00
99 0 fitbit 0 1.0 2.0 2020-11-01 10:02:00
100 0 fitbit 0 1.0 2.0 2020-11-01 10:03:00
101 0 fitbit 0 1.0 2.0 2020-11-01 10:04:00

View File

@ -0,0 +1,67 @@
test_time,device_id,level,mets,value
Fri 11:00:00.00,fitbit,0,1.0,2.0
Fri 11:01:00.00,fitbit,0,1.0,2.0
Fri 11:02:00.00,fitbit,0,1.0,2.0
Fri 11:04:00.00,fitbit,0,1.0,2.0
Fri 11:05:00.00,fitbit,0,1.0,2.0
Fri 11:10:00.00,fitbit,1,1.0,5.0
Fri 11:11:00.00,fitbit,1,2.0,4.0
Fri 11:12:00.00,fitbit,1,3.0,3.0
Fri 11:18:00.00,fitbit,1,2.0,6.0
Fri 11:24:00.00,fitbit,1,2.0,7.0
Fri 11:40:00.00,fitbit,2,11.0,50.0
Fri 11:41:00.00,fitbit,2,12.0,40.0
Fri 11:42:00.00,fitbit,2,13.0,30.0
Fri 11:48:00.00,fitbit,2,12.0,60.0
Fri 11:54:00.00,fitbit,2,12.0,70.0
Fri 11:58:00.00,fitbit,0,1.0,2.0
Fri 11:59:00.00,fitbit,0,1.0,2.0
Fri 12:00:00.00,fitbit,0,1.0,2.0
Fri 12:01:00.00,fitbit,0,1.0,2.0
Fri 12:02:00.00,fitbit,0,1.0,2.0
Fri 12:10:00.00,fitbit,3,1.0,5.0
Fri 12:11:00.00,fitbit,3,2.0,4.0
Fri 12:12:00.00,fitbit,3,3.0,3.0
Fri 12:18:00.00,fitbit,3,2.0,6.0
Fri 12:24:00.00,fitbit,3,2.0,7.0
Fri 12:30:00.00,fitbit,3,1.0,1.0
Fri 12:31:00.00,fitbit,2,2.0,2.0
Fri 12:32:00.00,fitbit,2,3.0,3.0
Fri 12:34:00.00,fitbit,3,4.0,4.0
Fri 12:37:00.00,fitbit,2,5.0,5.0
Sat 08:59:00.00,fitbit,0,1.0,2.0
Sat 09:00:00.00,fitbit,0,1.0,2.0
Sat 09:01:00.00,fitbit,0,1.0,2.0
Sat 12:59:00.00,fitbit,0,1.0,2.0
Sat 13:00:00.00,fitbit,0,1.0,2.0
Sat 13:01:00.00,fitbit,0,1.0,2.0
Sat 16:00:00.00,fitbit,0,1.0,2.0
Sat 16:01:00.00,fitbit,0,1.0,2.0
Sat 16:02:00.00,fitbit,0,1.0,2.0
Sat 16:03:00.00,fitbit,3,1.0,2.0
Sat 16:04:00.00,fitbit,3,1.0,2.0
Sat 16:05:00.00,fitbit,3,1.0,2.0
Sun 02:00:00.00,fitbit,0,1.0,2.0
Sun 02:01:00.00,fitbit,0,1.0,2.0
Sun 09:00:00.00,fitbit,0,1.0,2.0
Sun 12:01:00.00,fitbit,0,1.0,2.0
Sun 10:01:00.00,fitbit,0,1.0,2.0
Sun 10:02:00.00,fitbit,0,1.0,2.0
Sun 10:03:00.00,fitbit,0,1.0,2.0
Sun 10:04:00.00,fitbit,0,1.0,2.0
1 test_time device_id level mets value
2 Fri 11:00:00.00 fitbit 0 1.0 2.0
3 Fri 11:01:00.00 fitbit 0 1.0 2.0
4 Fri 11:02:00.00 fitbit 0 1.0 2.0
5 Fri 11:04:00.00 fitbit 0 1.0 2.0
6 Fri 11:05:00.00 fitbit 0 1.0 2.0
7 Fri 11:10:00.00 fitbit 1 1.0 5.0
8 Fri 11:11:00.00 fitbit 1 2.0 4.0
9 Fri 11:12:00.00 fitbit 1 3.0 3.0
10 Fri 11:18:00.00 fitbit 1 2.0 6.0
11 Fri 11:24:00.00 fitbit 1 2.0 7.0
12 Fri 11:40:00.00 fitbit 2 11.0 50.0
13 Fri 11:41:00.00 fitbit 2 12.0 40.0
14 Fri 11:42:00.00 fitbit 2 13.0 30.0
15 Fri 11:48:00.00 fitbit 2 12.0 60.0
16 Fri 11:54:00.00 fitbit 2 12.0 70.0
17 Fri 11:58:00.00 fitbit 0 1.0 2.0
18 Fri 11:59:00.00 fitbit 0 1.0 2.0
19 Fri 12:00:00.00 fitbit 0 1.0 2.0
20 Fri 12:01:00.00 fitbit 0 1.0 2.0
21 Fri 12:02:00.00 fitbit 0 1.0 2.0
22 Fri 12:10:00.00 fitbit 3 1.0 5.0
23 Fri 12:11:00.00 fitbit 3 2.0 4.0
24 Fri 12:12:00.00 fitbit 3 3.0 3.0
25 Fri 12:18:00.00 fitbit 3 2.0 6.0
26 Fri 12:24:00.00 fitbit 3 2.0 7.0
27 Fri 12:30:00.00 fitbit 3 1.0 1.0
28 Fri 12:31:00.00 fitbit 2 2.0 2.0
29 Fri 12:32:00.00 fitbit 2 3.0 3.0
30 Fri 12:34:00.00 fitbit 3 4.0 4.0
31 Fri 12:37:00.00 fitbit 2 5.0 5.0
32 Sat 08:59:00.00 fitbit 0 1.0 2.0
33 Sat 09:00:00.00 fitbit 0 1.0 2.0
34 Sat 09:01:00.00 fitbit 0 1.0 2.0
35 Sat 12:59:00.00 fitbit 0 1.0 2.0
36 Sat 13:00:00.00 fitbit 0 1.0 2.0
37 Sat 13:01:00.00 fitbit 0 1.0 2.0
38 Sat 16:00:00.00 fitbit 0 1.0 2.0
39 Sat 16:01:00.00 fitbit 0 1.0 2.0
40 Sat 16:02:00.00 fitbit 0 1.0 2.0
41 Sat 16:03:00.00 fitbit 3 1.0 2.0
42 Sat 16:04:00.00 fitbit 3 1.0 2.0
43 Sat 16:05:00.00 fitbit 3 1.0 2.0
44 Sun 02:00:00.00 fitbit 0 1.0 2.0
45 Sun 02:01:00.00 fitbit 0 1.0 2.0
46 Sun 09:00:00.00 fitbit 0 1.0 2.0
47 Sun 12:01:00.00 fitbit 0 1.0 2.0
48 Sun 10:01:00.00 fitbit 0 1.0 2.0
49 Sun 10:02:00.00 fitbit 0 1.0 2.0
50 Sun 10:03:00.00 fitbit 0 1.0 2.0
51 Sun 10:04:00.00 fitbit 0 1.0 2.0

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -57,7 +57,7 @@ class RapidsTests(unittest.TestCase):
print("Comparing {} and {}".format(act_result, exp_result)) print("Comparing {} and {}".format(act_result, exp_result))
df_exp = df_exp.reindex(sorted(df_exp.columns), axis=1) df_exp = df_exp.reindex(sorted(df_exp.columns), axis=1)
df_act = df_act.reindex(sorted(df_act.columns), axis=1) df_act = df_act.reindex(sorted(df_act.columns), axis=1)
pd.testing.assert_frame_equal(df_exp, df_act, obj=df_exp) pd.testing.assert_frame_equal(df_exp, df_act, obj="df_exp")
class TestStzFrequency(RapidsTests): class TestStzFrequency(RapidsTests):
@ -132,6 +132,7 @@ def run_some_tests(test_type):
big_suite = unittest.TestSuite(suite) big_suite = unittest.TestSuite(suite)
runner = unittest.TextTestRunner() runner = unittest.TextTestRunner()
results = runner.run(big_suite) results = runner.run(big_suite)
sys.exit(not results.wasSuccessful())
if __name__ == '__main__': if __name__ == '__main__':

View File

@ -26,10 +26,10 @@ run_pipeline() {
echo $TYPE echo $TYPE
echo "Deleting old outputs" echo "Deleting old outputs"
snakemake --configfile=$(echo $CONFIG_FILE) --delete-all-output -j1 snakemake --configfile=$(echo $CONFIG_FILE) --delete-all-output -j1 || exit
echo "Running RAPIDS" echo "Running RAPIDS"
snakemake --configfile=$(echo $CONFIG_FILE) -R pull_phone_data -j1 snakemake --configfile=$(echo $CONFIG_FILE) -R pull_phone_data -j2 || exit
} }
display_usage() { display_usage() {
@ -97,6 +97,6 @@ else
fi fi
if { [ "$ACTION" == 'test' ] || [ "$ACTION" == 'both' ]; } if { [ "$ACTION" == 'test' ] || [ "$ACTION" == 'both' ]; }
then then
python tests/scripts/run_tests.py $(echo $TYPE) python tests/scripts/run_tests.py $(echo $TYPE) || exit
fi fi
fi fi

View File

@ -37,8 +37,8 @@ TIMEZONE:
IF_MISSING_TZCODE: STOP IF_MISSING_TZCODE: STOP
DEFAULT_TZCODE: America/New_York DEFAULT_TZCODE: America/New_York
FITBIT: FITBIT:
ALLOW_MULTIPLE_TZ_PER_DEVICE: False ALLOW_MULTIPLE_TZ_PER_DEVICE: True
INFER_FROM_SMARTPHONE_TZ: False INFER_FROM_SMARTPHONE_TZ: True
######################################################################################################################## ########################################################################################################################
# PHONE # # PHONE #
@ -140,7 +140,7 @@ PHONE_BATTERY:
EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode.
PROVIDERS: PROVIDERS:
RAPIDS: RAPIDS:
COMPUTE: True COMPUTE: False
FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"] FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"]
SRC_SCRIPT: src/features/phone_battery/rapids/main.py SRC_SCRIPT: src/features/phone_battery/rapids/main.py
@ -339,6 +339,18 @@ FITBIT_DATA_STREAMS:
SLEEP_SUMMARY_EPISODE_DAY_ANCHOR: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp. SLEEP_SUMMARY_EPISODE_DAY_ANCHOR: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp.
# Sensors ------ # Sensors ------
FITBIT_CALORIES_INTRADAY:
CONTAINER: fitbit_calories_intraday_raw.csv
PROVIDERS:
RAPIDS:
COMPUTE: True
EPISODE_TYPE: [sedentary, lightlyactive, fairlyactive, veryactive, mvpa, lowmet, highmet]
EPISODE_TIME_THRESHOLD: 5 # minutes
EPISODE_MET_THRESHOLD: 3
EPISODE_MVPA_CATEGORIES: [fairlyactive, veryactive]
EPISODE_REFERENCE_TIME: MIDNIGHT # MIDNIGHT or START_OF_THE_SEGMENT
FEATURES: [count, sumduration, avgduration, minduration, maxduration, stdduration, starttimefirst, endtimefirst, starttimelast, endtimelast, starttimelongest, endtimelongest, summet, avgmet, maxmet, minmet, stdmet, sumcalories, avgcalories, maxcalories, mincalories, stdcalories]
SRC_SCRIPT: src/features/fitbit_calories_intraday/rapids/main.R
# See https://www.rapids.science/latest/features/fitbit-data-yield/ # See https://www.rapids.science/latest/features/fitbit-data-yield/
FITBIT_DATA_YIELD: FITBIT_DATA_YIELD:

View File

@ -37,8 +37,8 @@ TIMEZONE:
IF_MISSING_TZCODE: STOP IF_MISSING_TZCODE: STOP
DEFAULT_TZCODE: America/New_York DEFAULT_TZCODE: America/New_York
FITBIT: FITBIT:
ALLOW_MULTIPLE_TZ_PER_DEVICE: False ALLOW_MULTIPLE_TZ_PER_DEVICE: True
INFER_FROM_SMARTPHONE_TZ: False INFER_FROM_SMARTPHONE_TZ: True
######################################################################################################################## ########################################################################################################################
# PHONE # # PHONE #
@ -140,7 +140,7 @@ PHONE_BATTERY:
EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode.
PROVIDERS: PROVIDERS:
RAPIDS: RAPIDS:
COMPUTE: TRUE COMPUTE: False
FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"] FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"]
SRC_SCRIPT: src/features/phone_battery/rapids/main.py SRC_SCRIPT: src/features/phone_battery/rapids/main.py
@ -340,6 +340,19 @@ FITBIT_DATA_STREAMS:
# Sensors ------ # Sensors ------
FITBIT_CALORIES_INTRADAY:
CONTAINER: fitbit_calories_intraday_raw.csv
PROVIDERS:
RAPIDS:
COMPUTE: True
EPISODE_TYPE: [sedentary, lightlyactive, fairlyactive, veryactive, mvpa, lowmet, highmet]
EPISODE_TIME_THRESHOLD: 5 # minutes
EPISODE_MET_THRESHOLD: 3
EPISODE_MVPA_CATEGORIES: [fairlyactive, veryactive]
EPISODE_REFERENCE_TIME: MIDNIGHT # MIDNIGHT or START_OF_THE_SEGMENT
FEATURES: [count, sumduration, avgduration, minduration, maxduration, stdduration, starttimefirst, endtimefirst, starttimelast, endtimelast, starttimelongest, endtimelongest, summet, avgmet, maxmet, minmet, stdmet, sumcalories, avgcalories, maxcalories, mincalories, stdcalories]
SRC_SCRIPT: src/features/fitbit_calories_intraday/rapids/main.R
# See https://www.rapids.science/latest/features/fitbit-data-yield/ # See https://www.rapids.science/latest/features/fitbit-data-yield/
FITBIT_DATA_YIELD: FITBIT_DATA_YIELD:
SENSOR: FITBIT_HEARTRATE_INTRADAY SENSOR: FITBIT_HEARTRATE_INTRADAY

View File

@ -37,8 +37,8 @@ TIMEZONE:
IF_MISSING_TZCODE: STOP IF_MISSING_TZCODE: STOP
DEFAULT_TZCODE: America/New_York DEFAULT_TZCODE: America/New_York
FITBIT: FITBIT:
ALLOW_MULTIPLE_TZ_PER_DEVICE: False ALLOW_MULTIPLE_TZ_PER_DEVICE: True
INFER_FROM_SMARTPHONE_TZ: False INFER_FROM_SMARTPHONE_TZ: True
######################################################################################################################## ########################################################################################################################
# PHONE # # PHONE #
@ -140,7 +140,7 @@ PHONE_BATTERY:
EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode.
PROVIDERS: PROVIDERS:
RAPIDS: RAPIDS:
COMPUTE: True COMPUTE: False
FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"] FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"]
SRC_SCRIPT: src/features/phone_battery/rapids/main.py SRC_SCRIPT: src/features/phone_battery/rapids/main.py
@ -339,6 +339,18 @@ FITBIT_DATA_STREAMS:
SLEEP_SUMMARY_EPISODE_DAY_ANCHOR: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp. SLEEP_SUMMARY_EPISODE_DAY_ANCHOR: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp.
# Sensors ------ # Sensors ------
FITBIT_CALORIES_INTRADAY:
CONTAINER: fitbit_calories_intraday_raw.csv
PROVIDERS:
RAPIDS:
COMPUTE: True
EPISODE_TYPE: [sedentary, lightlyactive, fairlyactive, veryactive, mvpa, lowmet, highmet]
EPISODE_TIME_THRESHOLD: 5 # minutes
EPISODE_MET_THRESHOLD: 3
EPISODE_MVPA_CATEGORIES: [fairlyactive, veryactive]
EPISODE_REFERENCE_TIME: MIDNIGHT # MIDNIGHT or START_OF_THE_SEGMENT
FEATURES: [count, sumduration, avgduration, minduration, maxduration, stdduration, starttimefirst, endtimefirst, starttimelast, endtimelast, starttimelongest, endtimelongest, summet, avgmet, maxmet, minmet, stdmet, sumcalories, avgcalories, maxcalories, mincalories, stdcalories]
SRC_SCRIPT: src/features/fitbit_calories_intraday/rapids/main.R
# See https://www.rapids.science/latest/features/fitbit-data-yield/ # See https://www.rapids.science/latest/features/fitbit-data-yield/
FITBIT_DATA_YIELD: FITBIT_DATA_YIELD:

View File

@ -140,7 +140,7 @@ PHONE_BATTERY:
EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode.
PROVIDERS: PROVIDERS:
RAPIDS: RAPIDS:
COMPUTE: True COMPUTE: False
FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"] FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"]
SRC_SCRIPT: src/features/phone_battery/rapids/main.py SRC_SCRIPT: src/features/phone_battery/rapids/main.py
@ -339,6 +339,18 @@ FITBIT_DATA_STREAMS:
SLEEP_SUMMARY_EPISODE_DAY_ANCHOR: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp. SLEEP_SUMMARY_EPISODE_DAY_ANCHOR: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp.
# Sensors ------ # Sensors ------
FITBIT_CALORIES_INTRADAY:
CONTAINER: fitbit_calories_intraday_raw.csv
PROVIDERS:
RAPIDS:
COMPUTE: True
EPISODE_TYPE: [sedentary, lightlyactive, fairlyactive, veryactive, mvpa, lowmet, highmet]
EPISODE_TIME_THRESHOLD: 5 # minutes
EPISODE_MET_THRESHOLD: 3
EPISODE_MVPA_CATEGORIES: [fairlyactive, veryactive]
EPISODE_REFERENCE_TIME: MIDNIGHT # MIDNIGHT or START_OF_THE_SEGMENT
FEATURES: [count, sumduration, avgduration, minduration, maxduration, stdduration, starttimefirst, endtimefirst, starttimelast, endtimelast, starttimelongest, endtimelongest, summet, avgmet, maxmet, minmet, stdmet, sumcalories, avgcalories, maxcalories, mincalories, stdcalories]
SRC_SCRIPT: src/features/fitbit_calories_intraday/rapids/main.R
# See https://www.rapids.science/latest/features/fitbit-data-yield/ # See https://www.rapids.science/latest/features/fitbit-data-yield/
FITBIT_DATA_YIELD: FITBIT_DATA_YIELD:

View File

@ -140,7 +140,7 @@ PHONE_BATTERY:
EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode.
PROVIDERS: PROVIDERS:
RAPIDS: RAPIDS:
COMPUTE: TRUE COMPUTE: False
FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"] FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"]
SRC_SCRIPT: src/features/phone_battery/rapids/main.py SRC_SCRIPT: src/features/phone_battery/rapids/main.py
@ -340,6 +340,19 @@ FITBIT_DATA_STREAMS:
# Sensors ------ # Sensors ------
FITBIT_CALORIES_INTRADAY:
CONTAINER: fitbit_calories_intraday_raw.csv
PROVIDERS:
RAPIDS:
COMPUTE: True
EPISODE_TYPE: [sedentary, lightlyactive, fairlyactive, veryactive, mvpa, lowmet, highmet]
EPISODE_TIME_THRESHOLD: 5 # minutes
EPISODE_MET_THRESHOLD: 3
EPISODE_MVPA_CATEGORIES: [fairlyactive, veryactive]
EPISODE_REFERENCE_TIME: MIDNIGHT # MIDNIGHT or START_OF_THE_SEGMENT
FEATURES: [count, sumduration, avgduration, minduration, maxduration, stdduration, starttimefirst, endtimefirst, starttimelast, endtimelast, starttimelongest, endtimelongest, summet, avgmet, maxmet, minmet, stdmet, sumcalories, avgcalories, maxcalories, mincalories, stdcalories]
SRC_SCRIPT: src/features/fitbit_calories_intraday/rapids/main.R
# See https://www.rapids.science/latest/features/fitbit-data-yield/ # See https://www.rapids.science/latest/features/fitbit-data-yield/
FITBIT_DATA_YIELD: FITBIT_DATA_YIELD:
SENSOR: FITBIT_HEARTRATE_INTRADAY SENSOR: FITBIT_HEARTRATE_INTRADAY

View File

@ -140,7 +140,7 @@ PHONE_BATTERY:
EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode.
PROVIDERS: PROVIDERS:
RAPIDS: RAPIDS:
COMPUTE: True COMPUTE: False
FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"] FEATURES: ["countdischarge", "sumdurationdischarge", "countcharge", "sumdurationcharge", "avgconsumptionrate", "maxconsumptionrate"]
SRC_SCRIPT: src/features/phone_battery/rapids/main.py SRC_SCRIPT: src/features/phone_battery/rapids/main.py
@ -339,6 +339,18 @@ FITBIT_DATA_STREAMS:
SLEEP_SUMMARY_EPISODE_DAY_ANCHOR: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp. SLEEP_SUMMARY_EPISODE_DAY_ANCHOR: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp.
# Sensors ------ # Sensors ------
FITBIT_CALORIES_INTRADAY:
CONTAINER: fitbit_calories_intraday_raw.csv
PROVIDERS:
RAPIDS:
COMPUTE: True
EPISODE_TYPE: [sedentary, lightlyactive, fairlyactive, veryactive, mvpa, lowmet, highmet]
EPISODE_TIME_THRESHOLD: 5 # minutes
EPISODE_MET_THRESHOLD: 3
EPISODE_MVPA_CATEGORIES: [fairlyactive, veryactive]
EPISODE_REFERENCE_TIME: MIDNIGHT # MIDNIGHT or START_OF_THE_SEGMENT
FEATURES: [count, sumduration, avgduration, minduration, maxduration, stdduration, starttimefirst, endtimefirst, starttimelast, endtimelast, starttimelongest, endtimelongest, summet, avgmet, maxmet, minmet, stdmet, sumcalories, avgcalories, maxcalories, mincalories, stdcalories]
SRC_SCRIPT: src/features/fitbit_calories_intraday/rapids/main.R
# See https://www.rapids.science/latest/features/fitbit-data-yield/ # See https://www.rapids.science/latest/features/fitbit-data-yield/
FITBIT_DATA_YIELD: FITBIT_DATA_YIELD: