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

Improve piplite.install time for Panelite notebooks #4388

Merged
merged 19 commits into from
Mar 7, 2023

Conversation

MarcSkovMadsen
Copy link
Collaborator

@MarcSkovMadsen MarcSkovMadsen commented Feb 4, 2023

Closes #4209

Closed in this PR

Worked around in this PR

Main Panel Issues

Other Panel Issues

Other Issues

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Feb 4, 2023

Hi @philippjfr. This is how I would minimize the piplite.install. I just add a DEPENDENCY dictionary containing the notebook as key and its list of dependencies as value.

I will determine and test the list of dependencies for each notebook manually. If there is an automated way to test this, then please let me know.

I chose not to add the specific install in the notebook because it might overwhelm users looking at website or using notebook in normal Python environment.

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Feb 4, 2023

According to jupyterlite/jupyterlite#379 (comment) it should now be possible to provide a direct link to a specific notebook in Jupyterlite. I.e. it should be possible to setup an automated test using Playright that each notebook can run.

For example this link works https://panelite.holoviz.org/lab/index.html?path=reference/panes/DataFrame.ipynb

@codecov
Copy link

codecov bot commented Feb 4, 2023

Codecov Report

Merging #4388 (723a33b) into main (c9702ee) will decrease coverage by 3.22%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #4388      +/-   ##
==========================================
- Coverage   82.32%   79.11%   -3.22%     
==========================================
  Files         243      243              
  Lines       35579    35579              
==========================================
- Hits        29292    28147    -1145     
- Misses       6287     7432    +1145     
Flag Coverage Δ
ui-tests 35.86% <ø> (-0.01%) ⬇️
unitexamples-tests 71.03% <ø> (-3.22%) ⬇️

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

Impacted Files Coverage Δ
panel/pane/vtk/synchronizable_deserializer.py 0.00% <0.00%> (-97.59%) ⬇️
panel/pane/vtk/synchronizable_serializer.py 1.11% <0.00%> (-76.56%) ⬇️
panel/tests/pane/test_vtk.py 19.55% <0.00%> (-73.44%) ⬇️
panel/pane/vtk/vtk.py 45.21% <0.00%> (-47.44%) ⬇️
panel/tests/pane/test_vega.py 64.64% <0.00%> (-31.32%) ⬇️
panel/pane/deckgl.py 72.00% <0.00%> (-24.00%) ⬇️
panel/io/__init__.py 75.00% <0.00%> (-20.00%) ⬇️
panel/tests/pane/test_markup.py 82.91% <0.00%> (-16.46%) ⬇️
panel/tests/pane/test_deckgl.py 82.88% <0.00%> (-16.22%) ⬇️
panel/io/django.py 0.00% <0.00%> (-11.33%) ⬇️
... and 6 more

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

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Feb 5, 2023

Assets (needed due to CORS issues with existing links)

panel-014.jpg

panel-014.jpg

panel-013.jpg

panel-013.jpg

portfolio-analysis.mp4

ezgif.com-gif-maker.9.mp4

dummy.pdf

dummy.pdf

sample.pdf

sample.pdf

@philippjfr philippjfr force-pushed the fix/panelite-piplite-install-time branch from a697a09 to 090fef4 Compare March 7, 2023 09:29
@philippjfr philippjfr marked this pull request as ready for review March 7, 2023 09:34
@philippjfr
Copy link
Member

pre-commit.ci autofix

Copy link
Member

@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will merge this as-is for now. Might spend some time cleaning this up further. Specifically we do have pn.io.mime_render.find_imports which tries to automatically extract required imports from source code.

@philippjfr philippjfr merged commit f0c64ae into main Mar 7, 2023
@philippjfr philippjfr deleted the fix/panelite-piplite-install-time branch March 7, 2023 10:40
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.

Make panelite notebook installs specific to the packages that are imported
2 participants