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

Allow passing Parameter instances to Param pane #303

Merged
merged 2 commits into from Mar 14, 2019
Merged

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Mar 14, 2019

This is a bit of convenience to easily add single parameter widgets, i.e. this code:

 pn.pane.Param(parameterized, parameters=['parameter'], show_name=False)

becomes:

pn.pane.Param(parameterized.param.parameter)

@philippjfr philippjfr merged commit e8f8533 into master Mar 14, 2019
2 of 3 checks passed
@codecov-io
Copy link

@codecov-io codecov-io commented Mar 14, 2019

Codecov Report

Merging #303 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #303      +/-   ##
=========================================
+ Coverage   89.26%   89.3%   +0.03%     
=========================================
  Files          63      63              
  Lines        6504    6528      +24     
=========================================
+ Hits         5806    5830      +24     
  Misses        698     698
Impacted Files Coverage Δ
panel/param.py 92.12% <100%> (+0.1%) ⬆️
panel/tests/test_param.py 99.66% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0a873a...7104c8b. Read the comment docs.

@jbednar
Copy link
Member

@jbednar jbednar commented Mar 14, 2019

From the code, it looks like this would also work?

pn.Column(parameterized.param.param1, parameterized.param.param2)

That seems like a more common pattern than pn.pane.Param(parameterized.param.param1). But then there would be no label for each widget?

@philippjfr
Copy link
Member Author

@philippjfr philippjfr commented Mar 14, 2019

That seems like a more common pattern than pn.pane.Param(parameterized.param.param1). But then there would be no label for each widget?

Why wouldn't there be? Are you referring to show_name=False? That controls whether there is a label for the parameterized as a whole not for the individual parameter.

@jbednar
Copy link
Member

@jbednar jbednar commented Mar 14, 2019

Sounds good!

@philippjfr philippjfr deleted the param_instance_pane branch Sep 9, 2019
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.

None yet

3 participants