Skip to content

Commit

Permalink
update: tests with the new action param type!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed Nov 30, 2023
1 parent 15ca7a6 commit 0383d20
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 155 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,21 @@ def test_became_not_consistent():
acc_names = []
acc_count = 10

INT_THR = 1 # minimum number of interactions to be active
UW_DEG_THR = 1 # minimum number of accounts interacted with to be active
PAUSED_T_THR = 1 # time period to remain paused
CON_T_THR = 4 # time period to be consistent active
CON_O_THR = 3 # time period to be consistent active
EDGE_STR_THR = 5 # minimum number of interactions for connected
UW_THR_DEG_THR = 5 # minimum number of accounts for connected
VITAL_T_THR = 4 # time period to assess for vital
VITAL_O_THR = 3 # times to be connected within VITAL_T_THR to be vital
STILL_T_THR = 2 # time period to assess for still active
STILL_O_THR = 2 # times to be active within STILL_T_THR to be still active
# time periods into the past (history) to be newly active for computing dropped
DROP_H_THR = 2
# consecutive time periods into the past to have not been active for computing
DROP_I_THR = 1

act_param = [
INT_THR,
UW_DEG_THR,
PAUSED_T_THR,
CON_T_THR,
CON_O_THR,
EDGE_STR_THR,
UW_THR_DEG_THR,
VITAL_T_THR,
VITAL_O_THR,
STILL_T_THR,
STILL_O_THR,
DROP_H_THR,
DROP_I_THR,
]
act_param = {
"INT_THR": 1,
"UW_DEG_THR": 1,
"PAUSED_T_THR": 1,
"CON_T_THR": 4,
"CON_O_THR": 3,
"EDGE_STR_THR": 5,
"UW_THR_DEG_THR": 5,
"VITAL_T_THR": 4,
"VITAL_O_THR": 3,
"STILL_T_THR": 2,
"STILL_O_THR": 2,
"DROP_H_THR": 2,
"DROP_I_THR": 1,
}

for i in range(acc_count):
acc_names.append(f"user{i}")
Expand Down
46 changes: 15 additions & 31 deletions tc_core_analyzer_lib/tests/integration/test_all_became_unvital.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,21 @@ def test_all_became_unvital():
acc_names = []
acc_count = 10

INT_THR = 1 # minimum number of interactions to be active
UW_DEG_THR = 1 # minimum number of accounts interacted with to be active
PAUSED_T_THR = 1 # time period to remain paused
CON_T_THR = 4 # time period to be consistent active
CON_O_THR = 3 # time period to be consistent active
EDGE_STR_THR = 5 # minimum number of interactions for connected
UW_THR_DEG_THR = 5 # minimum number of accounts for connected
VITAL_T_THR = 4 # time period to assess for vital
VITAL_O_THR = 3 # times to be connected within VITAL_T_THR to be vital
STILL_T_THR = 2 # time period to assess for still active
STILL_O_THR = 2 # times to be active within STILL_T_THR to be still active
# time periods into the past (history) to be newly active for computing dropped
DROP_H_THR = 2
# consecutive time periods into the past to have not been active for computing
DROP_I_THR = 1

act_param = [
INT_THR,
UW_DEG_THR,
PAUSED_T_THR,
CON_T_THR,
CON_O_THR,
EDGE_STR_THR,
UW_THR_DEG_THR,
VITAL_T_THR,
VITAL_O_THR,
STILL_T_THR,
STILL_O_THR,
DROP_H_THR,
DROP_I_THR,
]
act_param = {
"INT_THR": 1,
"UW_DEG_THR": 1,
"PAUSED_T_THR": 1,
"CON_T_THR": 4,
"CON_O_THR": 3,
"EDGE_STR_THR": 5,
"UW_THR_DEG_THR": 5,
"VITAL_T_THR": 4,
"VITAL_O_THR": 3,
"STILL_T_THR": 2,
"STILL_O_THR": 2,
"DROP_H_THR": 2,
"DROP_I_THR": 1,
}

for i in range(acc_count):
acc_names.append(f"user{i}")
Expand Down
46 changes: 15 additions & 31 deletions tc_core_analyzer_lib/tests/integration/test_all_new_consistent.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,37 +51,21 @@ def test_all_new_consistent():
}
memberactivities = activity_dict.keys()

INT_THR = 1 # minimum number of interactions to be active
UW_DEG_THR = 1 # minimum number of accounts interacted with to be active
PAUSED_T_THR = 1 # time period to remain paused
CON_T_THR = 4 # time period to be consistent active
CON_O_THR = 3 # time period to be consistent active
EDGE_STR_THR = 5 # minimum number of interactions for connected
UW_THR_DEG_THR = 5 # minimum number of accounts for connected
VITAL_T_THR = 4 # time period to assess for vital
VITAL_O_THR = 3 # times to be connected within VITAL_T_THR to be vital
STILL_T_THR = 2 # time period to assess for still active
STILL_O_THR = 2 # times to be active within STILL_T_THR to be still active
# time periods into the past (history) to be newly active for computing dropped
DROP_H_THR = 2
# consecutive time periods into the past to have not been active for computing
DROP_I_THR = 1

act_param = [
INT_THR,
UW_DEG_THR,
PAUSED_T_THR,
CON_T_THR,
CON_O_THR,
EDGE_STR_THR,
UW_THR_DEG_THR,
VITAL_T_THR,
VITAL_O_THR,
STILL_T_THR,
STILL_O_THR,
DROP_H_THR,
DROP_I_THR,
]
act_param = {
"INT_THR": 1,
"UW_DEG_THR": 1,
"PAUSED_T_THR": 1,
"CON_T_THR": 4,
"CON_O_THR": 3,
"EDGE_STR_THR": 5,
"UW_THR_DEG_THR": 5,
"VITAL_T_THR": 4,
"VITAL_O_THR": 3,
"STILL_T_THR": 2,
"STILL_O_THR": 2,
"DROP_H_THR": 2,
"DROP_I_THR": 1,
}

int_mat = {
DiscordActivity.Reply: np.zeros((acc_count, acc_count)),
Expand Down
46 changes: 15 additions & 31 deletions tc_core_analyzer_lib/tests/integration/test_all_new_vital.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,21 @@ def test_new_vital():
acc_names = []
acc_count = 10

INT_THR = 1 # minimum number of interactions to be active
UW_DEG_THR = 1 # minimum number of accounts interacted with to be active
PAUSED_T_THR = 1 # time period to remain paused
CON_T_THR = 4 # time period to be consistent active
CON_O_THR = 3 # time period to be consistent active
EDGE_STR_THR = 5 # minimum number of interactions for connected
UW_THR_DEG_THR = 5 # minimum number of accounts for connected
VITAL_T_THR = 4 # time period to assess for vital
VITAL_O_THR = 3 # times to be connected within VITAL_T_THR to be vital
STILL_T_THR = 2 # time period to assess for still active
STILL_O_THR = 2 # times to be active within STILL_T_THR to be still active
# time periods into the past (history) to be newly active for computing dropped
DROP_H_THR = 2
# consecutive time periods into the past to have not been active for computing
DROP_I_THR = 1

act_param = [
INT_THR,
UW_DEG_THR,
PAUSED_T_THR,
CON_T_THR,
CON_O_THR,
EDGE_STR_THR,
UW_THR_DEG_THR,
VITAL_T_THR,
VITAL_O_THR,
STILL_T_THR,
STILL_O_THR,
DROP_H_THR,
DROP_I_THR,
]
act_param = {
"INT_THR": 1,
"UW_DEG_THR": 1,
"PAUSED_T_THR": 1,
"CON_T_THR": 4,
"CON_O_THR": 3,
"EDGE_STR_THR": 5,
"UW_THR_DEG_THR": 5,
"VITAL_T_THR": 4,
"VITAL_O_THR": 3,
"STILL_T_THR": 2,
"STILL_O_THR": 2,
"DROP_H_THR": 2,
"DROP_I_THR": 1,
}

for i in range(acc_count):
acc_names.append(f"user{i}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,37 +51,21 @@ def test_inconsistently_active():
}
memberactivities = activity_dict.keys()

INT_THR = 1 # minimum number of interactions to be active
UW_DEG_THR = 1 # minimum number of accounts interacted with to be active
PAUSED_T_THR = 1 # time period to remain paused
CON_T_THR = 4 # time period to be consistent active
CON_O_THR = 3 # time period to be consistent active
EDGE_STR_THR = 5 # minimum number of interactions for connected
UW_THR_DEG_THR = 5 # minimum number of accounts for connected
VITAL_T_THR = 4 # time period to assess for vital
VITAL_O_THR = 3 # times to be connected within VITAL_T_THR to be vital
STILL_T_THR = 2 # time period to assess for still active
STILL_O_THR = 2 # times to be active within STILL_T_THR to be still active
# time periods into the past (history) to be newly active for computing dropped
DROP_H_THR = 2
# consecutive time periods into the past to have not been active for computing
DROP_I_THR = 1

act_param = [
INT_THR,
UW_DEG_THR,
PAUSED_T_THR,
CON_T_THR,
CON_O_THR,
EDGE_STR_THR,
UW_THR_DEG_THR,
VITAL_T_THR,
VITAL_O_THR,
STILL_T_THR,
STILL_O_THR,
DROP_H_THR,
DROP_I_THR,
]
act_param = {
"INT_THR": 1,
"UW_DEG_THR": 1,
"PAUSED_T_THR": 1,
"CON_T_THR": 4,
"CON_O_THR": 3,
"EDGE_STR_THR": 5,
"UW_THR_DEG_THR": 5,
"VITAL_T_THR": 4,
"VITAL_O_THR": 3,
"STILL_T_THR": 2,
"STILL_O_THR": 2,
"DROP_H_THR": 2,
"DROP_I_THR": 1,
}

int_mat = {
DiscordActivity.Reply: np.zeros((acc_count, acc_count)),
Expand Down

0 comments on commit 0383d20

Please sign in to comment.