diff --git a/docs/develop/test_cases.rst b/docs/develop/test_cases.rst index fc65ad7a..cd32456a 100644 --- a/docs/develop/test_cases.rst +++ b/docs/develop/test_cases.rst @@ -3,7 +3,7 @@ Test Cases ----------- -Along with the continued development and the addition of new sensors and features to the RAPIDS pipeline, tests for the currently available sensors and features are being implemented. Since this is a Work In Progress this page will be updated with the list of sensors and features for which testing is available. For each of the sensors listed a description of the data used for testing (test cases) are outline. Currently for all intent and testing purposes the ``tests/data/raw/test01/`` contains all the test data files for testing android data formats and ``tests/data/raw/test02/`` contains all the test data files for testing iOS data formats. It follows that the expected (verified output) are contained in the ``tests/data/processed/test01/`` and ``tests/data/processed/test02/`` for Android and iOS respectively. +Along with the continued development and the addition of new sensors and features to the RAPIDS pipeline, tests for the currently available sensors and features are being implemented. Since this is a Work In Progress this page will be updated with the list of sensors and features for which testing is available. For each of the sensors listed a description of the data used for testing (test cases) are outline. Currently for all intent and testing purposes the ``tests/data/raw/test01/`` contains all the test data files for testing android data formats and ``tests/data/raw/test02/`` contains all the test data files for testing iOS data formats. It follows that the expected (verified output) are contained in the ``tests/data/processed/test01/`` and ``tests/data/processed/test02/`` for Android and iOS respectively. ``tests/data/raw/test03/`` and ``tests/data/raw/test04/`` contain data files for testing empty raw data files for android and iOS respectively. List of Sensor with Tests ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -17,7 +17,8 @@ Messages (SMS) - The data for the first day contains records 5 records for every ``epoch``. - The second day's data contains 6 records for each of only 2 ``epoch`` (currently ``morning`` and ``evening``) - The raw message data contains records for both ``message_types`` (i.e. ``recieved`` and ``sent``) in both days in all epochs. The number records with each ``message_types`` per epoch is randomly distributed There is at least one records with each ``message_types`` per epoch. - - There is one raw message data file each for testing both iOS and Android data. + - There is one raw message data file each, as described above, for testing both iOS and Android data. + - There is also an additional for both android and iOS that contains no raw input data for testing empty data files Calls """"""" @@ -28,7 +29,8 @@ Calls - The data for the first day contains 6 records for every ``epoch``. - The second day's data contains 6 records for each of only 2 ``epoch`` (currently ``morning`` and ``evening``) - The call data contains records for all ``call_types`` (i.e. ``incoming``, ``outgoing`` and ``missed``) in both days in all epochs. The number records with each of the ``call_types`` per epoch is randomly distributed. There is at least one records with each ``call_types`` per epoch. - - There is one call data file each for testing both iOS and Android data. + - There is one call data file each, as described above, for testing both iOS and Android data. + - There is also an additional for both android and iOS that contains no raw input data for testing empty data files Screen """""""" @@ -40,3 +42,5 @@ Screen - The screen delta data contains 1 record to represent an ``unlock`` episode that falls across the boundary of 2 epochs. Namely the ``unlock`` episode starts in one epoch and ends in the next, thus there is a record for ``unlock`` episodes that fall across ``night`` to ``morning``, ``morning`` to ``afternoon`` and finally ``afternoon`` to ``night`` - The testing is done for ``unlock`` episode_type. - There is one screen data file each for testing both iOS and Android data formats. + - There is also an additional for both android and iOS that contains no raw input data for testing empty data files + diff --git a/tests/data/external/test03 b/tests/data/external/test03 new file mode 100644 index 00000000..d4c20a73 --- /dev/null +++ b/tests/data/external/test03 @@ -0,0 +1,4 @@ +bU6WEnGU-bjBN-HhUh-7XNT-ZnrLJnOTW9Or +android +test03 android +2020/01/01,2020/06/01 \ No newline at end of file diff --git a/tests/data/external/test04 b/tests/data/external/test04 new file mode 100644 index 00000000..527fdbc8 --- /dev/null +++ b/tests/data/external/test04 @@ -0,0 +1,4 @@ +dGhYuH4N-8D8J-mL6l-9uQA-ArIzHIjBiJxU +ios +test04 ios +2020/01/01,2020/06/01 \ No newline at end of file diff --git a/tests/data/processed/test03/calls_incoming_afternoon.csv b/tests/data/processed/test03/calls_incoming_afternoon.csv new file mode 100644 index 00000000..7700f26f --- /dev/null +++ b/tests/data/processed/test03/calls_incoming_afternoon.csv @@ -0,0 +1 @@ +"local_date","call_incoming_afternoon_count","call_incoming_afternoon_distinctcontacts","call_incoming_afternoon_meanduration","call_incoming_afternoon_sumduration","call_incoming_afternoon_minduration","call_incoming_afternoon_maxduration","call_incoming_afternoon_stdduration","call_incoming_afternoon_modeduration","call_incoming_afternoon_entropyduration","call_incoming_afternoon_timefirstcall","call_incoming_afternoon_timelastcall","call_incoming_afternoon_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_incoming_daily.csv b/tests/data/processed/test03/calls_incoming_daily.csv new file mode 100644 index 00000000..15a7ab61 --- /dev/null +++ b/tests/data/processed/test03/calls_incoming_daily.csv @@ -0,0 +1 @@ +"local_date","call_incoming_daily_count","call_incoming_daily_distinctcontacts","call_incoming_daily_meanduration","call_incoming_daily_sumduration","call_incoming_daily_minduration","call_incoming_daily_maxduration","call_incoming_daily_stdduration","call_incoming_daily_modeduration","call_incoming_daily_entropyduration","call_incoming_daily_timefirstcall","call_incoming_daily_timelastcall","call_incoming_daily_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_incoming_evening.csv b/tests/data/processed/test03/calls_incoming_evening.csv new file mode 100644 index 00000000..8b52a987 --- /dev/null +++ b/tests/data/processed/test03/calls_incoming_evening.csv @@ -0,0 +1 @@ +"local_date","call_incoming_evening_count","call_incoming_evening_distinctcontacts","call_incoming_evening_meanduration","call_incoming_evening_sumduration","call_incoming_evening_minduration","call_incoming_evening_maxduration","call_incoming_evening_stdduration","call_incoming_evening_modeduration","call_incoming_evening_entropyduration","call_incoming_evening_timefirstcall","call_incoming_evening_timelastcall","call_incoming_evening_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_incoming_morning.csv b/tests/data/processed/test03/calls_incoming_morning.csv new file mode 100644 index 00000000..5e6c2b05 --- /dev/null +++ b/tests/data/processed/test03/calls_incoming_morning.csv @@ -0,0 +1 @@ +"local_date","call_incoming_morning_count","call_incoming_morning_distinctcontacts","call_incoming_morning_meanduration","call_incoming_morning_sumduration","call_incoming_morning_minduration","call_incoming_morning_maxduration","call_incoming_morning_stdduration","call_incoming_morning_modeduration","call_incoming_morning_entropyduration","call_incoming_morning_timefirstcall","call_incoming_morning_timelastcall","call_incoming_morning_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_incoming_night.csv b/tests/data/processed/test03/calls_incoming_night.csv new file mode 100644 index 00000000..d5718bda --- /dev/null +++ b/tests/data/processed/test03/calls_incoming_night.csv @@ -0,0 +1 @@ +"local_date","call_incoming_night_count","call_incoming_night_distinctcontacts","call_incoming_night_meanduration","call_incoming_night_sumduration","call_incoming_night_minduration","call_incoming_night_maxduration","call_incoming_night_stdduration","call_incoming_night_modeduration","call_incoming_night_entropyduration","call_incoming_night_timefirstcall","call_incoming_night_timelastcall","call_incoming_night_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_missed_afternoon.csv b/tests/data/processed/test03/calls_missed_afternoon.csv new file mode 100644 index 00000000..7b1d275f --- /dev/null +++ b/tests/data/processed/test03/calls_missed_afternoon.csv @@ -0,0 +1 @@ +"local_date","call_missed_afternoon_count","call_missed_afternoon_distinctcontacts","call_missed_afternoon_timefirstcall","call_missed_afternoon_timelastcall","call_missed_afternoon_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_missed_daily.csv b/tests/data/processed/test03/calls_missed_daily.csv new file mode 100644 index 00000000..52bccdee --- /dev/null +++ b/tests/data/processed/test03/calls_missed_daily.csv @@ -0,0 +1 @@ +"local_date","call_missed_daily_count","call_missed_daily_distinctcontacts","call_missed_daily_timefirstcall","call_missed_daily_timelastcall","call_missed_daily_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_missed_evening.csv b/tests/data/processed/test03/calls_missed_evening.csv new file mode 100644 index 00000000..5d1d36c7 --- /dev/null +++ b/tests/data/processed/test03/calls_missed_evening.csv @@ -0,0 +1 @@ +"local_date","call_missed_evening_count","call_missed_evening_distinctcontacts","call_missed_evening_timefirstcall","call_missed_evening_timelastcall","call_missed_evening_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_missed_morning.csv b/tests/data/processed/test03/calls_missed_morning.csv new file mode 100644 index 00000000..573c74f8 --- /dev/null +++ b/tests/data/processed/test03/calls_missed_morning.csv @@ -0,0 +1 @@ +"local_date","call_missed_morning_count","call_missed_morning_distinctcontacts","call_missed_morning_timefirstcall","call_missed_morning_timelastcall","call_missed_morning_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_missed_night.csv b/tests/data/processed/test03/calls_missed_night.csv new file mode 100644 index 00000000..61557e4e --- /dev/null +++ b/tests/data/processed/test03/calls_missed_night.csv @@ -0,0 +1 @@ +"local_date","call_missed_night_count","call_missed_night_distinctcontacts","call_missed_night_timefirstcall","call_missed_night_timelastcall","call_missed_night_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_outgoing_afternoon.csv b/tests/data/processed/test03/calls_outgoing_afternoon.csv new file mode 100644 index 00000000..3430c380 --- /dev/null +++ b/tests/data/processed/test03/calls_outgoing_afternoon.csv @@ -0,0 +1 @@ +"local_date","call_outgoing_afternoon_count","call_outgoing_afternoon_distinctcontacts","call_outgoing_afternoon_meanduration","call_outgoing_afternoon_sumduration","call_outgoing_afternoon_minduration","call_outgoing_afternoon_maxduration","call_outgoing_afternoon_stdduration","call_outgoing_afternoon_modeduration","call_outgoing_afternoon_entropyduration","call_outgoing_afternoon_timefirstcall","call_outgoing_afternoon_timelastcall","call_outgoing_afternoon_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_outgoing_daily.csv b/tests/data/processed/test03/calls_outgoing_daily.csv new file mode 100644 index 00000000..ed6ee7fa --- /dev/null +++ b/tests/data/processed/test03/calls_outgoing_daily.csv @@ -0,0 +1 @@ +"local_date","call_outgoing_daily_count","call_outgoing_daily_distinctcontacts","call_outgoing_daily_meanduration","call_outgoing_daily_sumduration","call_outgoing_daily_minduration","call_outgoing_daily_maxduration","call_outgoing_daily_stdduration","call_outgoing_daily_modeduration","call_outgoing_daily_entropyduration","call_outgoing_daily_timefirstcall","call_outgoing_daily_timelastcall","call_outgoing_daily_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_outgoing_evening.csv b/tests/data/processed/test03/calls_outgoing_evening.csv new file mode 100644 index 00000000..a459636a --- /dev/null +++ b/tests/data/processed/test03/calls_outgoing_evening.csv @@ -0,0 +1 @@ +"local_date","call_outgoing_evening_count","call_outgoing_evening_distinctcontacts","call_outgoing_evening_meanduration","call_outgoing_evening_sumduration","call_outgoing_evening_minduration","call_outgoing_evening_maxduration","call_outgoing_evening_stdduration","call_outgoing_evening_modeduration","call_outgoing_evening_entropyduration","call_outgoing_evening_timefirstcall","call_outgoing_evening_timelastcall","call_outgoing_evening_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_outgoing_morning.csv b/tests/data/processed/test03/calls_outgoing_morning.csv new file mode 100644 index 00000000..0beb5827 --- /dev/null +++ b/tests/data/processed/test03/calls_outgoing_morning.csv @@ -0,0 +1 @@ +"local_date","call_outgoing_morning_count","call_outgoing_morning_distinctcontacts","call_outgoing_morning_meanduration","call_outgoing_morning_sumduration","call_outgoing_morning_minduration","call_outgoing_morning_maxduration","call_outgoing_morning_stdduration","call_outgoing_morning_modeduration","call_outgoing_morning_entropyduration","call_outgoing_morning_timefirstcall","call_outgoing_morning_timelastcall","call_outgoing_morning_countmostfrequentcontact" diff --git a/tests/data/processed/test03/calls_outgoing_night.csv b/tests/data/processed/test03/calls_outgoing_night.csv new file mode 100644 index 00000000..fa763f36 --- /dev/null +++ b/tests/data/processed/test03/calls_outgoing_night.csv @@ -0,0 +1 @@ +"local_date","call_outgoing_night_count","call_outgoing_night_distinctcontacts","call_outgoing_night_meanduration","call_outgoing_night_sumduration","call_outgoing_night_minduration","call_outgoing_night_maxduration","call_outgoing_night_stdduration","call_outgoing_night_modeduration","call_outgoing_night_entropyduration","call_outgoing_night_timefirstcall","call_outgoing_night_timelastcall","call_outgoing_night_countmostfrequentcontact" diff --git a/tests/data/processed/test03/messages_received_afternoon.csv b/tests/data/processed/test03/messages_received_afternoon.csv new file mode 100644 index 00000000..640096b5 --- /dev/null +++ b/tests/data/processed/test03/messages_received_afternoon.csv @@ -0,0 +1 @@ +"local_date","messages_received_afternoon_countmostfrequentcontact","messages_received_afternoon_count","messages_received_afternoon_distinctcontacts","messages_received_afternoon_timefirstmessage","messages_received_afternoon_timelastmessage" diff --git a/tests/data/processed/test03/messages_received_daily.csv b/tests/data/processed/test03/messages_received_daily.csv new file mode 100644 index 00000000..de5543b9 --- /dev/null +++ b/tests/data/processed/test03/messages_received_daily.csv @@ -0,0 +1 @@ +"local_date","messages_received_daily_countmostfrequentcontact","messages_received_daily_count","messages_received_daily_distinctcontacts","messages_received_daily_timefirstmessage","messages_received_daily_timelastmessage" diff --git a/tests/data/processed/test03/messages_received_evening.csv b/tests/data/processed/test03/messages_received_evening.csv new file mode 100644 index 00000000..7325e9a9 --- /dev/null +++ b/tests/data/processed/test03/messages_received_evening.csv @@ -0,0 +1 @@ +"local_date","messages_received_evening_countmostfrequentcontact","messages_received_evening_count","messages_received_evening_distinctcontacts","messages_received_evening_timefirstmessage","messages_received_evening_timelastmessage" diff --git a/tests/data/processed/test03/messages_received_morning.csv b/tests/data/processed/test03/messages_received_morning.csv new file mode 100644 index 00000000..bbd446c3 --- /dev/null +++ b/tests/data/processed/test03/messages_received_morning.csv @@ -0,0 +1 @@ +"local_date","messages_received_morning_countmostfrequentcontact","messages_received_morning_count","messages_received_morning_distinctcontacts","messages_received_morning_timefirstmessage","messages_received_morning_timelastmessage" diff --git a/tests/data/processed/test03/messages_received_night.csv b/tests/data/processed/test03/messages_received_night.csv new file mode 100644 index 00000000..2d0ae76f --- /dev/null +++ b/tests/data/processed/test03/messages_received_night.csv @@ -0,0 +1 @@ +"local_date","messages_received_night_countmostfrequentcontact","messages_received_night_count","messages_received_night_distinctcontacts","messages_received_night_timefirstmessage","messages_received_night_timelastmessage" diff --git a/tests/data/processed/test03/messages_sent_afternoon.csv b/tests/data/processed/test03/messages_sent_afternoon.csv new file mode 100644 index 00000000..ab84aaba --- /dev/null +++ b/tests/data/processed/test03/messages_sent_afternoon.csv @@ -0,0 +1 @@ +"local_date","messages_sent_afternoon_countmostfrequentcontact","messages_sent_afternoon_count","messages_sent_afternoon_distinctcontacts","messages_sent_afternoon_timefirstmessage","messages_sent_afternoon_timelastmessage" diff --git a/tests/data/processed/test03/messages_sent_daily.csv b/tests/data/processed/test03/messages_sent_daily.csv new file mode 100644 index 00000000..f827b72f --- /dev/null +++ b/tests/data/processed/test03/messages_sent_daily.csv @@ -0,0 +1 @@ +"local_date","messages_sent_daily_countmostfrequentcontact","messages_sent_daily_count","messages_sent_daily_distinctcontacts","messages_sent_daily_timefirstmessage","messages_sent_daily_timelastmessage" diff --git a/tests/data/processed/test03/messages_sent_evening.csv b/tests/data/processed/test03/messages_sent_evening.csv new file mode 100644 index 00000000..ddfed962 --- /dev/null +++ b/tests/data/processed/test03/messages_sent_evening.csv @@ -0,0 +1 @@ +"local_date","messages_sent_evening_countmostfrequentcontact","messages_sent_evening_count","messages_sent_evening_distinctcontacts","messages_sent_evening_timefirstmessage","messages_sent_evening_timelastmessage" diff --git a/tests/data/processed/test03/messages_sent_morning.csv b/tests/data/processed/test03/messages_sent_morning.csv new file mode 100644 index 00000000..80235f96 --- /dev/null +++ b/tests/data/processed/test03/messages_sent_morning.csv @@ -0,0 +1 @@ +"local_date","messages_sent_morning_countmostfrequentcontact","messages_sent_morning_count","messages_sent_morning_distinctcontacts","messages_sent_morning_timefirstmessage","messages_sent_morning_timelastmessage" diff --git a/tests/data/processed/test03/messages_sent_night.csv b/tests/data/processed/test03/messages_sent_night.csv new file mode 100644 index 00000000..1b4351e0 --- /dev/null +++ b/tests/data/processed/test03/messages_sent_night.csv @@ -0,0 +1 @@ +"local_date","messages_sent_night_countmostfrequentcontact","messages_sent_night_count","messages_sent_night_distinctcontacts","messages_sent_night_timefirstmessage","messages_sent_night_timelastmessage" diff --git a/tests/data/processed/test03/screen_afternoon.csv b/tests/data/processed/test03/screen_afternoon.csv new file mode 100644 index 00000000..3a772ee2 --- /dev/null +++ b/tests/data/processed/test03/screen_afternoon.csv @@ -0,0 +1 @@ +local_date,screen_afternoon_mindurationunlock,screen_afternoon_countepisodeunlock,screen_afternoon_sumdurationunlock,screen_afternoon_episodepersensedminutesunlock,screen_afternoon_firstuseafter00unlock,screen_afternoon_maxdurationunlock,screen_afternoon_avgdurationunlock,screen_afternoon_stddurationunlock diff --git a/tests/data/processed/test03/screen_daily.csv b/tests/data/processed/test03/screen_daily.csv new file mode 100644 index 00000000..8f37011f --- /dev/null +++ b/tests/data/processed/test03/screen_daily.csv @@ -0,0 +1 @@ +local_date,screen_daily_avgdurationunlock,screen_daily_firstuseafter00unlock,screen_daily_mindurationunlock,screen_daily_countepisodeunlock,screen_daily_sumdurationunlock,screen_daily_maxdurationunlock,screen_daily_stddurationunlock,screen_daily_episodepersensedminutesunlock diff --git a/tests/data/processed/test03/screen_deltas.csv b/tests/data/processed/test03/screen_deltas.csv new file mode 100644 index 00000000..8209e74c --- /dev/null +++ b/tests/data/processed/test03/screen_deltas.csv @@ -0,0 +1 @@ +"episode","time_diff","local_start_date_time","local_end_date_time","local_start_date","local_end_date","local_start_day_segment","local_end_day_segment" diff --git a/tests/data/processed/test03/screen_evening.csv b/tests/data/processed/test03/screen_evening.csv new file mode 100644 index 00000000..11535ac4 --- /dev/null +++ b/tests/data/processed/test03/screen_evening.csv @@ -0,0 +1 @@ +local_date,screen_evening_countepisodeunlock,screen_evening_episodepersensedminutesunlock,screen_evening_mindurationunlock,screen_evening_stddurationunlock,screen_evening_maxdurationunlock,screen_evening_avgdurationunlock,screen_evening_sumdurationunlock,screen_evening_firstuseafter00unlock diff --git a/tests/data/processed/test03/screen_morning.csv b/tests/data/processed/test03/screen_morning.csv new file mode 100644 index 00000000..bdd4415b --- /dev/null +++ b/tests/data/processed/test03/screen_morning.csv @@ -0,0 +1 @@ +local_date,screen_morning_episodepersensedminutesunlock,screen_morning_avgdurationunlock,screen_morning_maxdurationunlock,screen_morning_firstuseafter00unlock,screen_morning_sumdurationunlock,screen_morning_stddurationunlock,screen_morning_countepisodeunlock,screen_morning_mindurationunlock diff --git a/tests/data/processed/test03/screen_night.csv b/tests/data/processed/test03/screen_night.csv new file mode 100644 index 00000000..71da3486 --- /dev/null +++ b/tests/data/processed/test03/screen_night.csv @@ -0,0 +1 @@ +local_date,screen_night_avgdurationunlock,screen_night_episodepersensedminutesunlock,screen_night_mindurationunlock,screen_night_stddurationunlock,screen_night_sumdurationunlock,screen_night_countepisodeunlock,screen_night_maxdurationunlock,screen_night_firstuseafter00unlock diff --git a/tests/data/processed/test04/calls_incoming_afternoon.csv b/tests/data/processed/test04/calls_incoming_afternoon.csv new file mode 100644 index 00000000..7700f26f --- /dev/null +++ b/tests/data/processed/test04/calls_incoming_afternoon.csv @@ -0,0 +1 @@ +"local_date","call_incoming_afternoon_count","call_incoming_afternoon_distinctcontacts","call_incoming_afternoon_meanduration","call_incoming_afternoon_sumduration","call_incoming_afternoon_minduration","call_incoming_afternoon_maxduration","call_incoming_afternoon_stdduration","call_incoming_afternoon_modeduration","call_incoming_afternoon_entropyduration","call_incoming_afternoon_timefirstcall","call_incoming_afternoon_timelastcall","call_incoming_afternoon_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_incoming_daily.csv b/tests/data/processed/test04/calls_incoming_daily.csv new file mode 100644 index 00000000..15a7ab61 --- /dev/null +++ b/tests/data/processed/test04/calls_incoming_daily.csv @@ -0,0 +1 @@ +"local_date","call_incoming_daily_count","call_incoming_daily_distinctcontacts","call_incoming_daily_meanduration","call_incoming_daily_sumduration","call_incoming_daily_minduration","call_incoming_daily_maxduration","call_incoming_daily_stdduration","call_incoming_daily_modeduration","call_incoming_daily_entropyduration","call_incoming_daily_timefirstcall","call_incoming_daily_timelastcall","call_incoming_daily_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_incoming_evening.csv b/tests/data/processed/test04/calls_incoming_evening.csv new file mode 100644 index 00000000..8b52a987 --- /dev/null +++ b/tests/data/processed/test04/calls_incoming_evening.csv @@ -0,0 +1 @@ +"local_date","call_incoming_evening_count","call_incoming_evening_distinctcontacts","call_incoming_evening_meanduration","call_incoming_evening_sumduration","call_incoming_evening_minduration","call_incoming_evening_maxduration","call_incoming_evening_stdduration","call_incoming_evening_modeduration","call_incoming_evening_entropyduration","call_incoming_evening_timefirstcall","call_incoming_evening_timelastcall","call_incoming_evening_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_incoming_morning.csv b/tests/data/processed/test04/calls_incoming_morning.csv new file mode 100644 index 00000000..5e6c2b05 --- /dev/null +++ b/tests/data/processed/test04/calls_incoming_morning.csv @@ -0,0 +1 @@ +"local_date","call_incoming_morning_count","call_incoming_morning_distinctcontacts","call_incoming_morning_meanduration","call_incoming_morning_sumduration","call_incoming_morning_minduration","call_incoming_morning_maxduration","call_incoming_morning_stdduration","call_incoming_morning_modeduration","call_incoming_morning_entropyduration","call_incoming_morning_timefirstcall","call_incoming_morning_timelastcall","call_incoming_morning_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_incoming_night.csv b/tests/data/processed/test04/calls_incoming_night.csv new file mode 100644 index 00000000..d5718bda --- /dev/null +++ b/tests/data/processed/test04/calls_incoming_night.csv @@ -0,0 +1 @@ +"local_date","call_incoming_night_count","call_incoming_night_distinctcontacts","call_incoming_night_meanduration","call_incoming_night_sumduration","call_incoming_night_minduration","call_incoming_night_maxduration","call_incoming_night_stdduration","call_incoming_night_modeduration","call_incoming_night_entropyduration","call_incoming_night_timefirstcall","call_incoming_night_timelastcall","call_incoming_night_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_missed_afternoon.csv b/tests/data/processed/test04/calls_missed_afternoon.csv new file mode 100644 index 00000000..7b1d275f --- /dev/null +++ b/tests/data/processed/test04/calls_missed_afternoon.csv @@ -0,0 +1 @@ +"local_date","call_missed_afternoon_count","call_missed_afternoon_distinctcontacts","call_missed_afternoon_timefirstcall","call_missed_afternoon_timelastcall","call_missed_afternoon_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_missed_daily.csv b/tests/data/processed/test04/calls_missed_daily.csv new file mode 100644 index 00000000..52bccdee --- /dev/null +++ b/tests/data/processed/test04/calls_missed_daily.csv @@ -0,0 +1 @@ +"local_date","call_missed_daily_count","call_missed_daily_distinctcontacts","call_missed_daily_timefirstcall","call_missed_daily_timelastcall","call_missed_daily_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_missed_evening.csv b/tests/data/processed/test04/calls_missed_evening.csv new file mode 100644 index 00000000..5d1d36c7 --- /dev/null +++ b/tests/data/processed/test04/calls_missed_evening.csv @@ -0,0 +1 @@ +"local_date","call_missed_evening_count","call_missed_evening_distinctcontacts","call_missed_evening_timefirstcall","call_missed_evening_timelastcall","call_missed_evening_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_missed_morning.csv b/tests/data/processed/test04/calls_missed_morning.csv new file mode 100644 index 00000000..573c74f8 --- /dev/null +++ b/tests/data/processed/test04/calls_missed_morning.csv @@ -0,0 +1 @@ +"local_date","call_missed_morning_count","call_missed_morning_distinctcontacts","call_missed_morning_timefirstcall","call_missed_morning_timelastcall","call_missed_morning_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_missed_night.csv b/tests/data/processed/test04/calls_missed_night.csv new file mode 100644 index 00000000..61557e4e --- /dev/null +++ b/tests/data/processed/test04/calls_missed_night.csv @@ -0,0 +1 @@ +"local_date","call_missed_night_count","call_missed_night_distinctcontacts","call_missed_night_timefirstcall","call_missed_night_timelastcall","call_missed_night_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_outgoing_afternoon.csv b/tests/data/processed/test04/calls_outgoing_afternoon.csv new file mode 100644 index 00000000..3430c380 --- /dev/null +++ b/tests/data/processed/test04/calls_outgoing_afternoon.csv @@ -0,0 +1 @@ +"local_date","call_outgoing_afternoon_count","call_outgoing_afternoon_distinctcontacts","call_outgoing_afternoon_meanduration","call_outgoing_afternoon_sumduration","call_outgoing_afternoon_minduration","call_outgoing_afternoon_maxduration","call_outgoing_afternoon_stdduration","call_outgoing_afternoon_modeduration","call_outgoing_afternoon_entropyduration","call_outgoing_afternoon_timefirstcall","call_outgoing_afternoon_timelastcall","call_outgoing_afternoon_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_outgoing_daily.csv b/tests/data/processed/test04/calls_outgoing_daily.csv new file mode 100644 index 00000000..ed6ee7fa --- /dev/null +++ b/tests/data/processed/test04/calls_outgoing_daily.csv @@ -0,0 +1 @@ +"local_date","call_outgoing_daily_count","call_outgoing_daily_distinctcontacts","call_outgoing_daily_meanduration","call_outgoing_daily_sumduration","call_outgoing_daily_minduration","call_outgoing_daily_maxduration","call_outgoing_daily_stdduration","call_outgoing_daily_modeduration","call_outgoing_daily_entropyduration","call_outgoing_daily_timefirstcall","call_outgoing_daily_timelastcall","call_outgoing_daily_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_outgoing_evening.csv b/tests/data/processed/test04/calls_outgoing_evening.csv new file mode 100644 index 00000000..a459636a --- /dev/null +++ b/tests/data/processed/test04/calls_outgoing_evening.csv @@ -0,0 +1 @@ +"local_date","call_outgoing_evening_count","call_outgoing_evening_distinctcontacts","call_outgoing_evening_meanduration","call_outgoing_evening_sumduration","call_outgoing_evening_minduration","call_outgoing_evening_maxduration","call_outgoing_evening_stdduration","call_outgoing_evening_modeduration","call_outgoing_evening_entropyduration","call_outgoing_evening_timefirstcall","call_outgoing_evening_timelastcall","call_outgoing_evening_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_outgoing_morning.csv b/tests/data/processed/test04/calls_outgoing_morning.csv new file mode 100644 index 00000000..0beb5827 --- /dev/null +++ b/tests/data/processed/test04/calls_outgoing_morning.csv @@ -0,0 +1 @@ +"local_date","call_outgoing_morning_count","call_outgoing_morning_distinctcontacts","call_outgoing_morning_meanduration","call_outgoing_morning_sumduration","call_outgoing_morning_minduration","call_outgoing_morning_maxduration","call_outgoing_morning_stdduration","call_outgoing_morning_modeduration","call_outgoing_morning_entropyduration","call_outgoing_morning_timefirstcall","call_outgoing_morning_timelastcall","call_outgoing_morning_countmostfrequentcontact" diff --git a/tests/data/processed/test04/calls_outgoing_night.csv b/tests/data/processed/test04/calls_outgoing_night.csv new file mode 100644 index 00000000..fa763f36 --- /dev/null +++ b/tests/data/processed/test04/calls_outgoing_night.csv @@ -0,0 +1 @@ +"local_date","call_outgoing_night_count","call_outgoing_night_distinctcontacts","call_outgoing_night_meanduration","call_outgoing_night_sumduration","call_outgoing_night_minduration","call_outgoing_night_maxduration","call_outgoing_night_stdduration","call_outgoing_night_modeduration","call_outgoing_night_entropyduration","call_outgoing_night_timefirstcall","call_outgoing_night_timelastcall","call_outgoing_night_countmostfrequentcontact" diff --git a/tests/data/processed/test04/messages_received_afternoon.csv b/tests/data/processed/test04/messages_received_afternoon.csv new file mode 100644 index 00000000..640096b5 --- /dev/null +++ b/tests/data/processed/test04/messages_received_afternoon.csv @@ -0,0 +1 @@ +"local_date","messages_received_afternoon_countmostfrequentcontact","messages_received_afternoon_count","messages_received_afternoon_distinctcontacts","messages_received_afternoon_timefirstmessage","messages_received_afternoon_timelastmessage" diff --git a/tests/data/processed/test04/messages_received_daily.csv b/tests/data/processed/test04/messages_received_daily.csv new file mode 100644 index 00000000..de5543b9 --- /dev/null +++ b/tests/data/processed/test04/messages_received_daily.csv @@ -0,0 +1 @@ +"local_date","messages_received_daily_countmostfrequentcontact","messages_received_daily_count","messages_received_daily_distinctcontacts","messages_received_daily_timefirstmessage","messages_received_daily_timelastmessage" diff --git a/tests/data/processed/test04/messages_received_evening.csv b/tests/data/processed/test04/messages_received_evening.csv new file mode 100644 index 00000000..7325e9a9 --- /dev/null +++ b/tests/data/processed/test04/messages_received_evening.csv @@ -0,0 +1 @@ +"local_date","messages_received_evening_countmostfrequentcontact","messages_received_evening_count","messages_received_evening_distinctcontacts","messages_received_evening_timefirstmessage","messages_received_evening_timelastmessage" diff --git a/tests/data/processed/test04/messages_received_morning.csv b/tests/data/processed/test04/messages_received_morning.csv new file mode 100644 index 00000000..bbd446c3 --- /dev/null +++ b/tests/data/processed/test04/messages_received_morning.csv @@ -0,0 +1 @@ +"local_date","messages_received_morning_countmostfrequentcontact","messages_received_morning_count","messages_received_morning_distinctcontacts","messages_received_morning_timefirstmessage","messages_received_morning_timelastmessage" diff --git a/tests/data/processed/test04/messages_received_night.csv b/tests/data/processed/test04/messages_received_night.csv new file mode 100644 index 00000000..2d0ae76f --- /dev/null +++ b/tests/data/processed/test04/messages_received_night.csv @@ -0,0 +1 @@ +"local_date","messages_received_night_countmostfrequentcontact","messages_received_night_count","messages_received_night_distinctcontacts","messages_received_night_timefirstmessage","messages_received_night_timelastmessage" diff --git a/tests/data/processed/test04/messages_sent_afternoon.csv b/tests/data/processed/test04/messages_sent_afternoon.csv new file mode 100644 index 00000000..ab84aaba --- /dev/null +++ b/tests/data/processed/test04/messages_sent_afternoon.csv @@ -0,0 +1 @@ +"local_date","messages_sent_afternoon_countmostfrequentcontact","messages_sent_afternoon_count","messages_sent_afternoon_distinctcontacts","messages_sent_afternoon_timefirstmessage","messages_sent_afternoon_timelastmessage" diff --git a/tests/data/processed/test04/messages_sent_daily.csv b/tests/data/processed/test04/messages_sent_daily.csv new file mode 100644 index 00000000..f827b72f --- /dev/null +++ b/tests/data/processed/test04/messages_sent_daily.csv @@ -0,0 +1 @@ +"local_date","messages_sent_daily_countmostfrequentcontact","messages_sent_daily_count","messages_sent_daily_distinctcontacts","messages_sent_daily_timefirstmessage","messages_sent_daily_timelastmessage" diff --git a/tests/data/processed/test04/messages_sent_evening.csv b/tests/data/processed/test04/messages_sent_evening.csv new file mode 100644 index 00000000..ddfed962 --- /dev/null +++ b/tests/data/processed/test04/messages_sent_evening.csv @@ -0,0 +1 @@ +"local_date","messages_sent_evening_countmostfrequentcontact","messages_sent_evening_count","messages_sent_evening_distinctcontacts","messages_sent_evening_timefirstmessage","messages_sent_evening_timelastmessage" diff --git a/tests/data/processed/test04/messages_sent_morning.csv b/tests/data/processed/test04/messages_sent_morning.csv new file mode 100644 index 00000000..80235f96 --- /dev/null +++ b/tests/data/processed/test04/messages_sent_morning.csv @@ -0,0 +1 @@ +"local_date","messages_sent_morning_countmostfrequentcontact","messages_sent_morning_count","messages_sent_morning_distinctcontacts","messages_sent_morning_timefirstmessage","messages_sent_morning_timelastmessage" diff --git a/tests/data/processed/test04/messages_sent_night.csv b/tests/data/processed/test04/messages_sent_night.csv new file mode 100644 index 00000000..1b4351e0 --- /dev/null +++ b/tests/data/processed/test04/messages_sent_night.csv @@ -0,0 +1 @@ +"local_date","messages_sent_night_countmostfrequentcontact","messages_sent_night_count","messages_sent_night_distinctcontacts","messages_sent_night_timefirstmessage","messages_sent_night_timelastmessage" diff --git a/tests/data/processed/test04/screen_afternoon.csv b/tests/data/processed/test04/screen_afternoon.csv new file mode 100644 index 00000000..e19013ce --- /dev/null +++ b/tests/data/processed/test04/screen_afternoon.csv @@ -0,0 +1 @@ +local_date,screen_afternoon_firstuseafter00unlock,screen_afternoon_sumdurationunlock,screen_afternoon_episodepersensedminutesunlock,screen_afternoon_mindurationunlock,screen_afternoon_countepisodeunlock,screen_afternoon_avgdurationunlock,screen_afternoon_stddurationunlock,screen_afternoon_maxdurationunlock diff --git a/tests/data/processed/test04/screen_daily.csv b/tests/data/processed/test04/screen_daily.csv new file mode 100644 index 00000000..5a3f3c74 --- /dev/null +++ b/tests/data/processed/test04/screen_daily.csv @@ -0,0 +1 @@ +local_date,screen_daily_maxdurationunlock,screen_daily_stddurationunlock,screen_daily_mindurationunlock,screen_daily_avgdurationunlock,screen_daily_sumdurationunlock,screen_daily_firstuseafter00unlock,screen_daily_countepisodeunlock,screen_daily_episodepersensedminutesunlock diff --git a/tests/data/processed/test04/screen_deltas.csv b/tests/data/processed/test04/screen_deltas.csv new file mode 100644 index 00000000..8209e74c --- /dev/null +++ b/tests/data/processed/test04/screen_deltas.csv @@ -0,0 +1 @@ +"episode","time_diff","local_start_date_time","local_end_date_time","local_start_date","local_end_date","local_start_day_segment","local_end_day_segment" diff --git a/tests/data/processed/test04/screen_evening.csv b/tests/data/processed/test04/screen_evening.csv new file mode 100644 index 00000000..c437e178 --- /dev/null +++ b/tests/data/processed/test04/screen_evening.csv @@ -0,0 +1 @@ +local_date,screen_evening_stddurationunlock,screen_evening_sumdurationunlock,screen_evening_episodepersensedminutesunlock,screen_evening_avgdurationunlock,screen_evening_maxdurationunlock,screen_evening_firstuseafter00unlock,screen_evening_countepisodeunlock,screen_evening_mindurationunlock diff --git a/tests/data/processed/test04/screen_morning.csv b/tests/data/processed/test04/screen_morning.csv new file mode 100644 index 00000000..2c9448e3 --- /dev/null +++ b/tests/data/processed/test04/screen_morning.csv @@ -0,0 +1 @@ +local_date,screen_morning_firstuseafter00unlock,screen_morning_sumdurationunlock,screen_morning_mindurationunlock,screen_morning_stddurationunlock,screen_morning_maxdurationunlock,screen_morning_countepisodeunlock,screen_morning_avgdurationunlock,screen_morning_episodepersensedminutesunlock diff --git a/tests/data/processed/test04/screen_night.csv b/tests/data/processed/test04/screen_night.csv new file mode 100644 index 00000000..96df94d2 --- /dev/null +++ b/tests/data/processed/test04/screen_night.csv @@ -0,0 +1 @@ +local_date,screen_night_avgdurationunlock,screen_night_mindurationunlock,screen_night_maxdurationunlock,screen_night_sumdurationunlock,screen_night_episodepersensedminutesunlock,screen_night_firstuseafter00unlock,screen_night_stddurationunlock,screen_night_countepisodeunlock diff --git a/tests/data/raw/test03/calls_raw.csv b/tests/data/raw/test03/calls_raw.csv new file mode 100644 index 00000000..635f16c2 --- /dev/null +++ b/tests/data/raw/test03/calls_raw.csv @@ -0,0 +1 @@ +timestamp,device_id,call_type,call_duration,trace \ No newline at end of file diff --git a/tests/data/raw/test03/messages_raw.csv b/tests/data/raw/test03/messages_raw.csv new file mode 100644 index 00000000..6e4ae903 --- /dev/null +++ b/tests/data/raw/test03/messages_raw.csv @@ -0,0 +1 @@ +timestamp,device_id,message_type,trace \ No newline at end of file diff --git a/tests/data/raw/test03/screen_raw.csv b/tests/data/raw/test03/screen_raw.csv new file mode 100644 index 00000000..2267904d --- /dev/null +++ b/tests/data/raw/test03/screen_raw.csv @@ -0,0 +1 @@ +timestamp,device_id,screen_status \ No newline at end of file diff --git a/tests/data/raw/test04/calls_raw.csv b/tests/data/raw/test04/calls_raw.csv new file mode 100644 index 00000000..635f16c2 --- /dev/null +++ b/tests/data/raw/test04/calls_raw.csv @@ -0,0 +1 @@ +timestamp,device_id,call_type,call_duration,trace \ No newline at end of file diff --git a/tests/data/raw/test04/messages_raw.csv b/tests/data/raw/test04/messages_raw.csv new file mode 100644 index 00000000..6e4ae903 --- /dev/null +++ b/tests/data/raw/test04/messages_raw.csv @@ -0,0 +1 @@ +timestamp,device_id,message_type,trace \ No newline at end of file diff --git a/tests/data/raw/test04/screen_raw.csv b/tests/data/raw/test04/screen_raw.csv new file mode 100644 index 00000000..2267904d --- /dev/null +++ b/tests/data/raw/test04/screen_raw.csv @@ -0,0 +1 @@ +timestamp,device_id,screen_status \ No newline at end of file diff --git a/tests/scripts/test_sensor_features.py b/tests/scripts/test_sensor_features.py index 6cbadaca..652a6d1f 100644 --- a/tests/scripts/test_sensor_features.py +++ b/tests/scripts/test_sensor_features.py @@ -33,7 +33,10 @@ class TestSensorFeatures(unittest.TestCase): for act_result, exp_result in calc_files[each]: df_act = pd.read_csv(act_result) df_exp = pd.read_csv(exp_result) - pd.testing.assert_frame_equal(df_exp, df_act, obj=df_exp) + if df_act.empty: + self.assertTrue(df_exp.empty) + else: + pd.testing.assert_frame_equal(df_exp, df_act, obj=df_exp) if __name__ == '__main__': diff --git a/tests/settings/testing_config.yaml b/tests/settings/testing_config.yaml index b7f25b3b..f1fc17f2 100644 --- a/tests/settings/testing_config.yaml +++ b/tests/settings/testing_config.yaml @@ -2,10 +2,9 @@ # If you are extracting screen or Barnett's location features, screen and locations tables are mandatory. TABLES_FOR_SENSED_BINS: [messages, calls, screen] - # Participants to include in the analysis # You must create a file for each participant named pXXX containing their device_id. This can be done manually or automatically -PIDS: [test01, test02] +PIDS: [test01, test02, test03, test04] # Global var with common day segments