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

Implement Widget.from_values #7033

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Implement Widget.from_values #7033

wants to merge 1 commit into from

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Jul 28, 2024

Implements #6071

  • Add docs
  • Update examples
  • Add tests

Copy link

codecov bot commented Jul 28, 2024

Codecov Report

Attention: Patch coverage is 31.81818% with 15 lines in your changes missing coverage. Please review.

Project coverage is 81.77%. Comparing base (78982fb) to head (7387b62).
Report is 1 commits behind head on main.

Files Patch % Lines
panel/widgets/base.py 37.50% 10 Missing ⚠️
panel/util/__init__.py 16.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7033      +/-   ##
==========================================
- Coverage   82.22%   81.77%   -0.46%     
==========================================
  Files         326      326              
  Lines       48271    48293      +22     
==========================================
- Hits        39691    39491     -200     
- Misses       8580     8802     +222     

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

@jbednar
Copy link
Member

jbednar commented Aug 14, 2024

This is a good start towards #7003; thanks! A few questions:

  1. What starting value is used by default? Seems like you'd want a midpoint value by default, not just the start value?
  2. For a Pandas Series, it should be cheap to calculate the min, avg, and max in a single pass (e.g. df['column_name'].agg(['min', 'average', 'max'])) to get the start, value, and end; is that a useful special case for a Series?
  3. Range widgets seem like they'd need different behavior, since a range should normally default to the start and end of the range. Will that already happen automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants