Skip to content

Commit

Permalink
clarify spinner msg
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasrodes committed Dec 12, 2024
1 parent e0f1c3d commit a4c084b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/wizard/app_pages/producer_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ def load_steps_df(excluded_steps) -> pd.DataFrame:
@st.cache_data(show_spinner=False)
def load_steps_df_with_producer_data(excluded_steps) -> pd.DataFrame:
# Load steps dataframe.
# st.toast("⌛ Loading data from VersionTracker...")
steps_df = load_steps_df(excluded_steps=excluded_steps)

# st.toast("⌛ Processing VersionTracker data...")
# Select only active snapshots.
df = steps_df[(steps_df["channel"] == "snapshot") & (steps_df["state"] == "active")].reset_index(drop=True)

Expand Down Expand Up @@ -187,6 +189,7 @@ def load_steps_df_with_producer_data(excluded_steps) -> pd.DataFrame:
@st.cache_data(show_spinner=False)
def get_producer_charts_analytics(min_date, max_date, excluded_steps):
# Get chart renders using user-defined date range for "renders_custom".
# st.toast("⌛ Getting analytics on chart renders...")
df_renders = get_chart_renders(min_date=min_date, max_date=max_date)

# Load the steps dataframe with producer data.
Expand Down Expand Up @@ -215,6 +218,7 @@ def get_producer_analytics_per_producer(min_date, max_date, excluded_steps):
# Load the steps dataframe with producer data and analytics.
df_expanded = get_producer_charts_analytics(min_date=min_date, max_date=max_date, excluded_steps=excluded_steps)

# st.toast("⌛ Adapting the data for presentation...")
# Group by producer and get the full list of chart slugs for each producer.
df_grouped = df_expanded.groupby("producer", observed=True, as_index=False).agg(
{
Expand Down Expand Up @@ -495,7 +499,7 @@ def prepare_summary(
)

# Load table content and select only columns to be shown.
with st.spinner("Loading producer data. This can take few seconds..."):
with st.spinner("Loading producer data. We are accessing various databases. This can take few seconds..."):
df_producers = get_producer_analytics_per_producer(
min_date=min_date, max_date=max_date, excluded_steps=excluded_steps
)
Expand Down

0 comments on commit a4c084b

Please sign in to comment.