File tree Expand file tree Collapse file tree 4 files changed +47
-0
lines changed
src/e3sm_quickview/jupyter Expand file tree Collapse file tree 4 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ tauri = [
4040vue2 = [
4141 " trame-grid-layout>=1.0.3" ,
4242]
43+ jupyter = [
44+ " jupyter-server-proxy>=4.0.0" ,
45+ ]
4346
4447
4548[build-system ]
@@ -53,6 +56,7 @@ include = [
5356 " /src/e3sm_quickview/data/**" ,
5457 " /src/e3sm_quickview/assets/**" ,
5558 " /src/e3sm_quickview/module/**" ,
59+ " /src/e3sm_quickview/jupyter/**" ,
5660]
5761
5862[tool .hatch .build .targets .wheel ]
@@ -64,6 +68,9 @@ packages = [
6468quickview-vue2 = " e3sm_quickview.app:main"
6569quickview = " e3sm_quickview.app:main"
6670
71+ [project .entry-points ."jupyter_serverproxy_servers" ]
72+ quickview = " e3sm_quickview.jupyter:setup_quickview"
73+
6774[tool .ruff .lint .per-file-ignores ]
6875# Ignore star import issues in ParaView plugins
6976"e3sm_quickview/plugins/*.py" = [" F403" , " F405" ]
Original file line number Diff line number Diff line change 1+ """Jupyter integration for QuickView via jupyter-server-proxy."""
2+
3+ from .proxy import setup_quickview
4+
5+ __all__ = ["setup_quickview" ]
Original file line number Diff line number Diff line change 1+ """Server proxy configuration for QuickView in JupyterLab."""
2+
3+ import os
4+
5+
6+ def setup_quickview ():
7+ """Configure jupyter-server-proxy for QuickView.
8+
9+ Returns a dictionary with the server process configuration that
10+ jupyter-server-proxy uses to launch and proxy QuickView.
11+ """
12+ icon_path = os .path .join (
13+ os .path .dirname (os .path .abspath (__file__ )),
14+ "icons" ,
15+ "quickview.png" ,
16+ )
17+
18+ return {
19+ "command" : [
20+ "quickview" ,
21+ "--server" ,
22+ "--port" ,
23+ "{port}" ,
24+ "--host" ,
25+ "127.0.0.1" ,
26+ ],
27+ "timeout" : 30 ,
28+ "launcher_entry" : {
29+ "enabled" : True ,
30+ "title" : "QuickView" ,
31+ "icon_path" : icon_path ,
32+ "category" : "Other" ,
33+ },
34+ "new_browser_tab" : False ,
35+ }
You can’t perform that action at this time.
0 commit comments