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

Add support for rendering inside PyScript Next #5911

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Conversation

philippjfr
Copy link
Member

For PyScript Next support we need to do a few things:

  1. Detect if we are in a worker and then patch the js.document and js.Bokeh objects
  2. Ensure that we act like we are on the main thread even though we are on the worker (since PyScript now transparently handles message passing between the two).

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (96f0d5a) 84.16% compared to head (91f2bdc) 72.38%.

Files Patch % Lines
panel/io/pyodide.py 0.00% 15 Missing ⚠️
panel/viewable.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5911       +/-   ##
===========================================
- Coverage   84.16%   72.38%   -11.78%     
===========================================
  Files         291      291               
  Lines       42779    42786        +7     
===========================================
- Hits        36005    30971     -5034     
- Misses       6774    11815     +5041     
Flag Coverage Δ
ui-tests ?
unitexamples-tests 72.38% <0.00%> (-0.06%) ⬇️

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

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

@philippjfr philippjfr merged commit 1af16eb into main Nov 22, 2023
12 of 13 checks passed
@philippjfr philippjfr deleted the pyscript_next_worker branch November 22, 2023 14:46
@MarcSkovMadsen
Copy link
Collaborator

I believe the template also needs an update. You can use <pyscript> but it should be <script type="py"> etc. now.

@philippjfr
Copy link
Member Author

Indeed, that'll land in 1.4.0. Wanted to get this into 1.3.2 since it was such a tiny fix. It also relies on absolute bleeding edge of pyscript core, since we had to resolve some issues that were uncovered by the Panel Python <-> JS message passing dance.

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