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

Loading JS once in the given cell #5249

Merged
merged 4 commits into from
Mar 31, 2022
Merged

Conversation

jlstevens
Copy link
Contributor

PR using the information now exposed in holoviz/pyviz_comms#87 to avoid repeatedly loading JS in the same cell (e.g. if multiple extensions are in the first cell of a notebook).

@philippjfr
Copy link
Member

Does not seem sufficient, you'll also have to handle these lines:

    for r in [r for r in resources if r != 'holoviews']:
        Store.renderers[r].load_nb(inline=p.inline)
    Renderer.load_nb(inline=p.inline)

and we probably also need to think about adding warning checking that if same_cell_execution is true and 'plotly' not in panel.extension._loaded_extensions that the user has to make sure they run hv.extension('plotly') or pn.extension('plotly') first.

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2022

Codecov Report

Merging #5249 (86d62d0) into master (bf781e3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #5249   +/-   ##
=======================================
  Coverage   86.75%   86.75%           
=======================================
  Files         298      298           
  Lines       62159    62162    +3     
=======================================
+ Hits        53926    53929    +3     
  Misses       8233     8233           
Impacted Files Coverage Δ
holoviews/ipython/__init__.py 76.21% <100.00%> (+0.44%) ⬆️

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 bf781e3...86d62d0. Read the comment docs.

@maximlt
Copy link
Member

maximlt commented Mar 30, 2022

I've merged master and the tests all passed 🎉 Ready to be merged then I think @jlstevens

@jlstevens
Copy link
Contributor Author

Thanks for fixing the tests! @philippjfr please merge if you think this PR is ready.

@philippjfr philippjfr merged commit 514f08c into master Mar 31, 2022
jlstevens added a commit that referenced this pull request Apr 1, 2022
* Only loading JS once in the same cell

* Made resource loading conditional on saml_cell_execution

* Fixed definition of same_cell_execution

Co-authored-by: maximlt <mliquet@anaconda.com>
@maximlt maximlt deleted the single_cell_extension_loading branch July 22, 2022 13:21
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 Oct 23, 2024
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.

4 participants