From 6162660d7d1f78ff905d23173e02a322f135cdd5 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Mon, 16 Oct 2023 10:06:56 +0330 Subject: [PATCH 1/4] feat: adding inconsistent members computation! We only need to merge this PR when the core-analyzer got updated! --- discord_analyzer/analysis/compute_member_activity.py | 1 + tests/integration/utils/mock_graph.py | 1 + tests/integration/utils/mock_memberactivities.py | 1 + 3 files changed, 3 insertions(+) diff --git a/discord_analyzer/analysis/compute_member_activity.py b/discord_analyzer/analysis/compute_member_activity.py index 3e53443..1a73978 100644 --- a/discord_analyzer/analysis/compute_member_activity.py +++ b/discord_analyzer/analysis/compute_member_activity.py @@ -151,6 +151,7 @@ def compute_member_activity( "all_lurker": {}, "all_about_to_disengage": {}, "all_disengaged_in_past": {}, + "all_inconsistent": {}, } activities_name = list(activity_dict.keys()) diff --git a/tests/integration/utils/mock_graph.py b/tests/integration/utils/mock_graph.py index d244e3a..e33545e 100644 --- a/tests/integration/utils/mock_graph.py +++ b/tests/integration/utils/mock_graph.py @@ -33,6 +33,7 @@ def generate_mock_graph(int_matrix, acc_names): "all_lurker": {}, "all_about_to_disengage": {}, "all_disengaged_in_past": {}, + "all_inconsistent": {}, } WINDOW_D = 7 diff --git a/tests/integration/utils/mock_memberactivities.py b/tests/integration/utils/mock_memberactivities.py index a1fa351..10dcd77 100644 --- a/tests/integration/utils/mock_memberactivities.py +++ b/tests/integration/utils/mock_memberactivities.py @@ -35,6 +35,7 @@ def create_empty_memberactivities_data( "all_lurker": [], "all_about_to_disengage": [], "all_disengaged_in_past": [], + "all_inconsistent": [], } data.append(document) From 2cfdd221d91cb65634be1d02919dd7ae9c463175 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Mon, 16 Oct 2023 10:09:46 +0330 Subject: [PATCH 2/4] Update: increase core-analyzer lib version! --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a686689..16c3ca4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,5 +22,5 @@ tc-messageBroker==1.4.0 sentry-sdk rq redis -tc-core-analyzer-lib==1.0.2 +tc-core-analyzer-lib==1.1.0 tc-neo4j-lib==1.0.0 From 7578265d152c12552ec75fb1d3d1440f4269f21b Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Mon, 16 Oct 2023 16:07:39 +0330 Subject: [PATCH 3/4] feat: added the 4 more activitiy type support! - all_new_consistent - all_new_vital - all_became_inconsistent - all_became_unvital --- discord_analyzer/analysis/compute_member_activity.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord_analyzer/analysis/compute_member_activity.py b/discord_analyzer/analysis/compute_member_activity.py index 1a73978..b7dcbd6 100644 --- a/discord_analyzer/analysis/compute_member_activity.py +++ b/discord_analyzer/analysis/compute_member_activity.py @@ -152,6 +152,10 @@ def compute_member_activity( "all_about_to_disengage": {}, "all_disengaged_in_past": {}, "all_inconsistent": {}, + "all_new_consistent": {}, + "all_new_vital": {}, + "all_became_inconsistent": {}, + "all_became_unvital": {}, } activities_name = list(activity_dict.keys()) From 5ed9f79e2e012e54e16bbf740f5721abe8dd2cba Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Tue, 17 Oct 2023 09:50:21 +0330 Subject: [PATCH 4/4] feat: udpate analytics name! --- discord_analyzer/analysis/compute_member_activity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord_analyzer/analysis/compute_member_activity.py b/discord_analyzer/analysis/compute_member_activity.py index b7dcbd6..c703ee5 100644 --- a/discord_analyzer/analysis/compute_member_activity.py +++ b/discord_analyzer/analysis/compute_member_activity.py @@ -154,7 +154,7 @@ def compute_member_activity( "all_inconsistent": {}, "all_new_consistent": {}, "all_new_vital": {}, - "all_became_inconsistent": {}, + "all_became_not_consistent": {}, "all_became_unvital": {}, } activities_name = list(activity_dict.keys())