Building bleeding edge jupyterlab

82 views
Skip to first unread message

Christian Schafmeister

unread,
Aug 24, 2018, 3:30:36 PM8/24/18
to Project Jupyter
Hi,

What is the best practice for building bleeding edge jupyterlab with extensions?

We are building a bleeding edge jupyterlab application that contains two extensions (nglview and bqplot).  
We have wholesale translated the Python code for these widgets into Common Lisp and we need to guarantee that the Javascript code for these extensions precisely matches the Common Lisp code and the Python code.
So we are installing the jupyter extensions from local source directories using the code below.
jupyterlab comes up immediately and then it appears to build the jupyterlab application again and again every time I hit the "Reload" button on my browser reloading jupyterlab.

Why is this?  

Is there any way to build the jupyterlab Javascript application once and for all - before I start jupyterlab?


/opt/clasp/bin/jupyter-labextension install @jupyter-widgets/jupyterla...@0.37 --no-build
# Don't rely on npm/yarn/whatever to install nglview widgets
/opt/clasp/bin/jupyter-labextension install /opt/clasp/lib/quicklisp/local-projects/cl-nglview/js --no-build
# Don't rely on npm/yarn/whatever to install bqplot widgets
/opt/clasp/bin/jupyter-labextension install /opt/clasp/lib/quicklisp/local-projects/cl-bqplot/js --no-build
/opt/clasp/bin/jupyter-lab build

Christian Schafmeister,
Professor, Chemistry Department
Temple University

Steven Silvester

unread,
Aug 31, 2018, 4:44:19 AM8/31/18
to Project Jupyter
Hi Christian,

Currently, installing from a local directory is in effect a link.  We run `npm pack` to determine whether the extension has changed on disk.  It shouldn't prompt you to rebuild unless it computes a different SHA sum, is it giving you false positives?


Regards,

Steve

On Friday, August 24, 2018 at 2:30:36 PM UTC-5, Christian Schafmeister wrote:
Hi,

What is the best practice for building bleeding edge jupyterlab with extensions?

We are building a bleeding edge jupyterlab application that contains two extensions (nglview and bqplot).  
We have wholesale translated the Python code for these widgets into Common Lisp and we need to guarantee that the Javascript code for these extensions precisely matches the Common Lisp code and the Python code.
So we are installing the jupyter extensions from local source directories using the code below.
jupyterlab comes up immediately and then it appears to build the jupyterlab application again and again every time I hit the "Reload" button on my browser reloading jupyterlab.

Why is this?  

Is there any way to build the jupyterlab Javascript application once and for all - before I start jupyterlab?


/opt/clasp/bin/jupyter-labextension install @jupyter-widgets/jupyterlab-man...@0.37 --no-build
# Don't rely on npm/yarn/whatever to install nglview widgets
/opt/clasp/bin/jupyter-labextension install /opt/clasp/lib/quicklisp/local-projects/cl-nglview/js --no-build
# Don't rely on npm/yarn/whatever to install bqplot widgets
/opt/clasp/bin/jupyter-labextension install /opt/clasp/lib/quicklisp/local-projects/cl-bqplot/js --no-build
/opt/clasp/bin/jupyter-lab build

Christian Schafmeister

unread,
Aug 31, 2018, 9:38:33 AM8/31/18
to Project Jupyter
Hello Steve,

It is building very often and very reproducibly.

Could you elaborate on "installing from a local directory is in effect a link"? 
I'll take a closer look at SHA sums and play with 'npm pack' to see if it gives me any indication that it wants to rebuild things.

Are there any other tests I can run that would provide useful feedback?

Best,

.Chris.

Steven Silvester

unread,
Sep 1, 2018, 8:41:23 AM9/1/18
to Project Jupyter
We treat an install of a local directory as "live" in that its contents might change at any time. It is not a true link in the "npm link" sense because "npm link" prevents deduping of dependencies, something that is required for JupyterLab's dependency injection system. As for the tar sum, here is the function we are using in jlab to compute it, since the hash of the tarball itself is unstable: https://github.com/jupyterlab/jupyterlab/blob/3201e4714ae85f3c21f0218261826595d55af518/jupyterlab/commands.py#L1550


Regards,

Steve

Christian Schafmeister

unread,
Sep 2, 2018, 1:28:20 AM9/2/18
to Project Jupyter
Oh - ok - that makes sense that local directories should be considered "live".

How does it work though?  The jupyterlab application comes up instantly when I connect the browser - and then it builds jupyterlab and loads it again?

Steven Silvester

unread,
Sep 4, 2018, 4:50:33 AM9/4/18
to Project Jupyter
When you launch JupyterLab it shows you the previously built application.  Then, it runs checks in the background to see if it needs to be rebuilt, prompting you to do so if it detects changes.


Regards,

Steve

On Friday, August 24, 2018 at 2:30:36 PM UTC-5, Christian Schafmeister wrote:
Hi,

What is the best practice for building bleeding edge jupyterlab with extensions?

We are building a bleeding edge jupyterlab application that contains two extensions (nglview and bqplot).  
We have wholesale translated the Python code for these widgets into Common Lisp and we need to guarantee that the Javascript code for these extensions precisely matches the Common Lisp code and the Python code.
So we are installing the jupyter extensions from local source directories using the code below.
jupyterlab comes up immediately and then it appears to build the jupyterlab application again and again every time I hit the "Reload" button on my browser reloading jupyterlab.

Why is this?  

Is there any way to build the jupyterlab Javascript application once and for all - before I start jupyterlab?


/opt/clasp/bin/jupyter-labextension install @jupyter-widgets/jupyterlab-man...@0.37 --no-build
# Don't rely on npm/yarn/whatever to install nglview widgets
/opt/clasp/bin/jupyter-labextension install /opt/clasp/lib/quicklisp/local-projects/cl-nglview/js --no-build
# Don't rely on npm/yarn/whatever to install bqplot widgets
/opt/clasp/bin/jupyter-labextension install /opt/clasp/lib/quicklisp/local-projects/cl-bqplot/js --no-build
/opt/clasp/bin/jupyter-lab build
Reply all
Reply to author
Forward
0 new messages