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

Implemented __signature__ for Viewable objects #1029

Merged
merged 2 commits into from Jan 29, 2020
Merged

Implemented __signature__ for Viewable objects #1029

merged 2 commits into from Jan 29, 2020

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Jan 29, 2020

Replaces the param docstring signature with a __signature__ attribute, which should allow for tab-completion in newer versions of IPython. The new signature is applied on extension load as long as pn.config.apply_signature is set.

Additionally this enforces strict rules on what Pane, Widget, and Panel component signatures must look like during testing. This ensures no new components are added without considering how the signature code affects them.

@codecov
Copy link

@codecov codecov bot commented Jan 29, 2020

Codecov Report

Merging #1029 into master will decrease coverage by 0.29%.
The diff coverage is 61.72%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1029     +/-   ##
=========================================
- Coverage   85.95%   85.65%   -0.3%     
=========================================
  Files         105      105             
  Lines       11924    12062    +138     
=========================================
+ Hits        10249    10332     +83     
- Misses       1675     1730     +55
Impacted Files Coverage Δ
panel/__init__.py 100% <100%> (ø) ⬆️
panel/tests/pane/test_base.py 87.5% <100%> (+3.5%) ⬆️
panel/tests/util.py 84.12% <100%> (+0.52%) ⬆️
panel/tests/test_layout.py 100% <100%> (ø) ⬆️
panel/tests/widgets/test_base.py 100% <100%> (ø) ⬆️
panel/tests/test_viewable.py 100% <100%> (ø) ⬆️
panel/widgets/select.py 93.95% <100%> (ø) ⬆️
panel/pane/vtk/vtk.py 53.92% <100%> (ø) ⬆️
panel/config.py 46.66% <8.82%> (-6.03%) ⬇️
panel/io/notebook.py 59.17% <0%> (-2.96%) ⬇️
... and 8 more

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 f425ed2...0d3f41d. Read the comment docs.

panel/config.py Outdated Show resolved Hide resolved
panel/config.py Show resolved Hide resolved
panel/config.py Outdated Show resolved Hide resolved
@philippjfr philippjfr merged commit 2695135 into master Jan 29, 2020
2 of 4 checks passed
@philippjfr philippjfr deleted the signatures branch Jan 31, 2020
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

2 participants