8000 Improve detection of comms in vscode and colab by hoxbro · Pull Request #4115 · holoviz/panel · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@hoxbro
Copy link
Member
@hoxbro hoxbro commented Nov 14, 2022

Fixes #3767

Before this PR if hv.extension was called before pn.extension it will be set pn.config.comms to "default" and not vscode in vs code or colab in Google Colab.

This PR refactors the detection into its own method and always calls in a notebook. On the first run, it will auto-detect the comms and replace None with one of default, ipywidgets, vscode, or colab. Then in the following calls, it will only change the comms if it is explicitly set.

image

I'm unsure if the order of pyodide and vscode should be swapped.

@codecov
Copy link
codecov bot commented Nov 14, 2022

Codecov Report

Merging #4115 (8c452c1) into master (6d90165) will decrease coverage by 0.00%.
The diff coverage is 8.33%.

@@            Coverage Diff             @@
##           master    #4115      +/-   ##
==========================================
- Coverage   83.58%   83.58%   -0.01%     
==========================================
  Files         223      223              
  Lines       33248    33244       -4     
==========================================
- Hits        27792    27788       -4     
  Misses       5456     5456              
Flag Coverage Δ
ui-tests 37.56% <8.33%> (-0.01%) ⬇️
unitexamples-tests 74.66% <8.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
panel/config.py 74.93% <8.33%> (-1.34%) ⬇️
panel/tests/command/test_serve.py 83.95% <0.00%> (-1.42%) ⬇️
panel/tests/util.py 91.17% <0.00%> (-0.09%) ⬇️
panel/io/jupyter_server_extension.py 0.00% <0.00%> (ø)
panel/io/state.py 69.83% <0.00%> (+0.01%) ⬆️
panel/tests/ui/widgets/test_tabulator.py 99.07% <0.00%> (+0.10%) ⬆️
panel/pane/idom.py 28.36% <0.00%> (+0.19%) ⬆️
panel/tests/conftest.py 88.79% <0.00%> (+0.38%) ⬆️
panel/io/callbacks.py 79.41% <0.00%> (+0.57%) ⬆️
panel/command/convert.py 32.35% <0.00%> (+0.92%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@philippjfr
Copy link
Member

Looks good to me. Ready to merge?

@hoxbro
Copy link
Member Author
hoxbro commented Nov 14, 2022

Yes

@philippjfr philippjfr merged commit 1f3d889 into master Nov 14, 2022
@philippjfr philippjfr deleted the detect_comms branch November 14, 2022 12:52
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatic comms detection is sensitive to import order

2 participants

0