Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New user feedback #7043

Merged
merged 16 commits into from
Sep 16, 2024
Merged

New user feedback #7043

merged 16 commits into from
Sep 16, 2024

Conversation

MarcSkovMadsen
Copy link
Collaborator

@MarcSkovMadsen MarcSkovMadsen commented Jul 30, 2024

I plan to contribute some improvements (primarely docs) based on my experience teaching a new user Panel.

Finally, we'll serve the app by running the command below in a terminal:

```bash
panel serve app.ipynb --autoreload
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately the getting started app displays

2024-07-30 06:41:20,719 Dropping a patch because it contains a previously known reference (id='p1269'). Most of the time this is harmless and usually a result of updating a model on one side of a communications channel while it was being removed on the other end.
2024-07-30 06:41:20,956 Dropping a patch because it contains a previously known reference (id='p1369'). Most of the time this is harmless and usually a result of updating a model on one side of a communications channel while it was being removed on the other end.
2024-07-30 06:41:21,789 Dropping a patch because it contains a previously known reference (id='p1551'). Most of the time this is harmless and usually a result of updating a model on one side of a communications channel while it was being removed on the other end.
2024-07-30 06:41:22,023 Dropping a patch because it contains a previously known reference (id='p1646'). Most of the time this is harmless and usually a result of updating a model on one side of a communications channel while it was being removed on the other end.
2024-07-30 06:41:22,255 Dropping a patch because it contains a previously known reference (id='p1738'). Most of the time this is harmless and usually a result of updating a model on one side of a communications channel while it was being removed on the other end.
2024-07-30 06:41:22,501 Dropping a patch because it contains a previously known reference (id='p1828'). Most of the time this is harmless and usually a result of updating a model on one side of a communications channel while it was being removed on the other end.
2024-07-30 06:41:22,740 Dropping a patch because it contains a previously known reference (id='p1918'). Most of the time this is harmless and usually a result of updating a model on one side of a communications channel while it was being removed on the other end.
2024-07-30 06:41:23,807 Dropping a patch because it contains a previously known reference (id='p2106'). Most of the time this is harmless and usually a result of updating a model on one side of a communications channel while it was being removed on the other end.
2024-07-30 06:41:24,047 Dropping a patch because it contains a previously known reference (id='p2207'). Most of the time this is harmless and usually a result of updating a model on one side of a communications channel while it was being removed on the other end.

This is highly confusing for a new user. Even though it states it probably not a problem its overload of information and signals that something is not fully robust.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't reproduce this.

Copy link
Collaborator Author

@MarcSkovMadsen MarcSkovMadsen Sep 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on the main branch of Panel and get this when I drag the top left slider.

dropping-patch.mp4

hvplot==0.10.0, holoviews==1.19.1,bokeh=3.5.0.

import hvplot.pandas
import numpy as np
import pandas as pd
import panel as pn

PRIMARY_COLOR = "#0072B5"
SECONDARY_COLOR = "#B54300"
CSV_FILE = (
    "https://raw.githubusercontent.com/holoviz/panel/main/examples/assets/occupancy.csv"
)

pn.extension(design="material", sizing_mode="stretch_width")

@pn.cache
def get_data():
  return pd.read_csv(CSV_FILE, parse_dates=["date"], index_col="date")

data = get_data()

def transform_data(variable, window, sigma):
    """Calculates the rolling average and identifies outliers"""
    avg = data[variable].rolling(window=window).mean()
    residual = data[variable] - avg
    std = residual.rolling(window=window).std()
    outliers = np.abs(residual) > std * sigma
    return avg, avg[outliers]


def get_plot(variable="Temperature", window=30, sigma=10):
    """Plots the rolling average and the outliers"""
    avg, highlight = transform_data(variable, window, sigma)
    return avg.hvplot(
        height=300, legend=False, color=PRIMARY_COLOR
    ) * highlight.hvplot.scatter(color=SECONDARY_COLOR, padding=0.1, legend=False)

variable_widget = pn.widgets.Select(name="variable", value="Temperature", options=list(data.columns))
window_widget = pn.widgets.IntSlider(name="window", value=30, start=1, end=60)
sigma_widget = pn.widgets.IntSlider(name="sigma", value=10, start=0, end=20)

bound_plot = pn.bind(
    get_plot, variable=variable_widget, window=window_widget, sigma=sigma_widget
)

pn.template.MaterialTemplate(
    site="Panel",
    title="Getting Started App",
    sidebar=[variable_widget, window_widget, sigma_widget],
    main=[bound_plot],
).servable(); # The ; is needed in the notebook to not display the template. Its not needed in a script

doc/getting_started/installation.md Outdated Show resolved Hide resolved
doc/getting_started/installation.md Outdated Show resolved Hide resolved
@@ -15,24 +15,23 @@
"cell_type": "markdown",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

codecov bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.17%. Comparing base (19025e1) to head (b2505b0).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7043      +/-   ##
==========================================
- Coverage   82.19%   82.17%   -0.03%     
==========================================
  Files         337      337              
  Lines       50363    50367       +4     
==========================================
- Hits        41398    41390       -8     
- Misses       8965     8977      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MarcSkovMadsen MarcSkovMadsen added this to the v1.5.0 milestone Aug 11, 2024
@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Sep 15, 2024

I see UI tests failing. But I don't think its related. I believe this is ready to review (and merge).

image

@philippjfr philippjfr merged commit 56b983f into main Sep 16, 2024
13 of 16 checks passed
@philippjfr philippjfr deleted the enhancement/new-user branch September 16, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants