Skip to content

Commit

Permalink
hotfix not sure how the list activity is now parsed correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
luutuankiet authored Feb 27, 2024
1 parent 1262a68 commit 0d4d080
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/charts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit 0d4d080

Please sign in to comment.