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

Fix layout persistence issues in dashboard builder #6602

Merged
merged 5 commits into from
Mar 28, 2024
Merged

Conversation

philippjfr
Copy link
Member

Fixes issues with layout persistence ensuring that the temporary .layout file takes precedence over the notebook metadata.

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 82.96%. Comparing base (2a35d9c) to head (e90cc1a).

Files Patch % Lines
panel/io/handlers.py 0.00% 9 Missing ⚠️
panel/pane/vega.py 10.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6602      +/-   ##
==========================================
- Coverage   82.98%   82.96%   -0.03%     
==========================================
  Files         313      313              
  Lines       46073    46090      +17     
==========================================
+ Hits        38235    38239       +4     
- Misses       7838     7851      +13     
Flag Coverage Δ
ui-tests 40.03% <4.76%> (-0.02%) ⬇️
unitexamples-tests 71.25% <14.28%> (-0.02%) ⬇️

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.

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Mar 28, 2024

I've

  • created a new python environment and activated it
  • pip installed jupyterlab param bokeh and matplotlib in it
  • installed the branch pip install -e .
  • started jupyter lab
  • created a new notebook (not named or saved it, but it has been autosaved)

image

If I save it, its the same.

Its the same with an empty notebook.

image

I don't see issues in the terminal except the 404

$ jupyter lab
[I 2024-03-28 17:43:00.754 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-03-28 17:43:00.767 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-03-28 17:43:00.781 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-03-28 17:43:01.405 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-03-28 17:43:01.784 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-03-28 17:43:01.787 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-03-28 17:43:01.788 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-03-28 17:43:01.794 LabApp] JupyterLab extension loaded from C:\repos\private\panel\.venv\Lib\site-packages\jupyterlab
[I 2024-03-28 17:43:01.795 LabApp] JupyterLab application directory is C:\repos\private\panel\.venv\share\jupyter\lab
[I 2024-03-28 17:43:01.796 LabApp] Extension Manager is 'pypi'.
[I 2024-03-28 17:43:01.813 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-03-28 17:43:01.815 ServerApp] Serving notebooks from local directory: C:\repos\private\panel
[I 2024-03-28 17:43:01.816 ServerApp] Jupyter Server 2.13.0 is running at:
[I 2024-03-28 17:43:01.816 ServerApp] http://localhost:8888/lab?token=a9be9dc3cb276f310c0875205d565b90c9b0bf8beb182250
[I 2024-03-28 17:43:01.816 ServerApp]     http://127.0.0.1:8888/lab?token=a9be9dc3cb276f310c0875205d565b90c9b0bf8beb182250
[I 2024-03-28 17:43:01.817 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2024-03-28 17:43:02.656 ServerApp] 

    To access the server, open this file in a browser:
        file:///C:/Users/masma/AppData/Roaming/jupyter/runtime/jpserver-25800-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/lab?token=a9be9dc3cb276f310c0875205d565b90c9b0bf8beb182250
        http://127.0.0.1:8888/lab?token=a9be9dc3cb276f310c0875205d565b90c9b0bf8beb182250
[W 2024-03-28 17:43:05.234 ServerApp] 404 GET /panel-preview/render/Demo.ipynb ([email protected]) 142.03ms referer=http://127.0.0.1:8888/panel-preview/render/Demo.ipynb
[I 2024-03-28 17:43:05.624 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
[I 2024-03-28 17:43:08.975 LabApp] Build is up to date
[I 2024-03-28 17:43:15.747 LabApp] Build is up to date
[I 2024-03-28 17:43:20.020 ServerApp] Kernel started: 67aeb99a-d19c-4924-81a7-c3fdc290fae1
[W 2024-03-28 17:43:20.959 ServerApp] 404 GET /panel-preview/layout/Demo.ipynb?1711644200956 (605b369e4a144d579ebb6b84cec229dc@::1) 2.00ms referer=http://localhost:8888/lab/workspaces/auto-I/tree/Demo.ipynb
[I 2024-03-28 17:43:20.973 ServerApp] Saving file at /Demo.ipynb
[W 2024-03-28 17:43:21.097 ServerApp] 404 GET /panel-preview/render/Demo.ipynb (605b369e4a144d579ebb6b84cec229dc@::1) 1.00ms referer=None
[I 2024-03-28 17:43:22.077 ServerApp] Connecting to kernel 67aeb99a-d19c-4924-81a7-c3fdc290fae1.
[I 2024-03-28 17:43:22.104 ServerApp] Connecting to kernel 67aeb99a-d19c-4924-81a7-c3fdc290fae1.
[I 2024-03-28 17:43:22.121 ServerApp] Connecting to kernel 67aeb99a-d19c-4924-81a7-c3fdc290fae1.
[W 2024-03-28 17:43:22.199 ServerApp] Got events for closed stream <zmq.eventloop.zmqstream.ZMQStream object at 0x00000246C1DFCE50>
[W 2024-03-28 17:43:22.209 ServerApp] Got events for closed stream <zmq.eventloop.zmqstream.ZMQStream object at 0x00000246C329A3D0>

Copy link
Collaborator

@MarcSkovMadsen MarcSkovMadsen left a comment

Choose a reason for hiding this comment

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

I should be able to use the preview correctly before merging.

@philippjfr
Copy link
Member Author

That's really unrelated to what's being done in this PR. In a development install is different from a package install, so you may have to run:

jupyter serverextension enable panel.io.jupyter_server_extension

@philippjfr
Copy link
Member Author

I'll just cut a dev release for you.

@philippjfr philippjfr merged commit 5d5150e into main Mar 28, 2024
15 checks passed
@philippjfr philippjfr deleted the layout_persist branch March 28, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants