From 0d4d0807c3d0d9f02246c83c91adc5d557052cf6 Mon Sep 17 00:00:00 2001 From: luutuankiet <56199834+luutuankiet@users.noreply.github.com> Date: Tue, 27 Feb 2024 17:00:38 -0500 Subject: [PATCH] hotfix not sure how the list activity is now parsed correctly. --- app/charts/main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/charts/main.py b/app/charts/main.py index 01afb71..5f078cc 100644 --- a/app/charts/main.py +++ b/app/charts/main.py @@ -465,7 +465,6 @@ def highlight_row(row): created_count = get_table(created_count_path) - st.write(created_count) filtered_created_count = created_count[(created_count['key'] >= pd.to_datetime(start)) & (created_count['key'] <= pd.to_datetime(end))] filtered_created_count.sort_values(by=['key'],ascending=True,inplace=True) created_count_grouped = filtered_created_count.groupby('day_of_year')['tasks_created'].sum().astype(int) @@ -500,7 +499,7 @@ def highlight_row(row): created_df_delta = created_df - created_df_delta['max_day_created_timestamp'] = pd.Timestamp.now(tz=common_tz) - pd.to_datetime(created_df_delta['max_day_created_timestamp']).dt.tz_localize(common_tz) + created_df_delta['max_day_created_timestamp'] = pd.Timestamp.now(tz=common_tz) - pd.to_datetime(created_df_delta['max_day_created_timestamp']) created_df_delta['max_day_created_timestamp'] = created_df_delta['max_day_created_timestamp'].apply(lambda x: humanize.naturaltime(x.total_seconds(),future=False)) create_progress = pd.merge(created_df_delta,filtered_lvl1_lvl2_progress,on=['fld_folder_name','l_list_name'],how='left') create_progress = create_progress.style.map( @@ -511,7 +510,7 @@ def highlight_row(row): active_df_delta = active_df - active_df_delta['max_day_active_timestamp'] = pd.Timestamp.now(tz=common_tz) - active_df_delta['max_day_active_timestamp'].dt.tz_localize(common_tz) + active_df_delta['max_day_active_timestamp'] = pd.Timestamp.now(tz=common_tz) - active_df_delta['max_day_active_timestamp'] active_df_delta['max_day_active_timestamp'] = active_df_delta['max_day_active_timestamp'].apply(lambda x: humanize.naturaltime(x.total_seconds(),future=False)) active_progress = pd.merge(active_df_delta,filtered_lvl1_lvl2_progress,on=['fld_folder_name','l_list_name'],how='left') active_progress = active_progress.style.map( @@ -524,7 +523,7 @@ def highlight_row(row): completed_df_delta = completed_df - completed_df_delta['max_day_completed_timestamp'] = pd.Timestamp.now(tz=common_tz) - completed_df_delta['max_day_completed_timestamp'].dt.tz_localize(common_tz) + completed_df_delta['max_day_completed_timestamp'] = pd.Timestamp.now(tz=common_tz) - completed_df_delta['max_day_completed_timestamp'] completed_df_delta['max_day_completed_timestamp'] = completed_df_delta['max_day_completed_timestamp'].apply(lambda x: humanize.naturaltime(x.total_seconds(),future=False)) complete_progress = pd.merge(completed_df_delta,filtered_lvl1_lvl2_progress,on=['fld_folder_name','l_list_name'],how='left') complete_progress = complete_progress.style.map(