Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

[TASK] Learn how Jupyter Lab handles Javascript execution and module dependencies #9

Open
CermakM opened this issue Sep 27, 2019 · 7 comments
Labels
task Task
Milestone

Comments

@CermakM
Copy link
Owner

CermakM commented Sep 27, 2019

User story
As the assignee of the epic to create the Jupyter Lab extension
I want to find out about the way Jupyter Lab handles Javascript execution and module dependencies
so that I could proceed further with the implementation.

Linked epics / issues
#7

@CermakM CermakM added the task Task label Sep 27, 2019
@CermakM CermakM added this to the Jupyter Lab milestone Sep 27, 2019
@monuelo
Copy link

monuelo commented Oct 20, 2019

When using local extensions and linked packages, you can run the command

jupyter lab --watch

This will cause the application to incrementally rebuild when one of the linked packages changes. Note that only compiled JavaScript files (and the CSS files) are watched by the WebPack process.

Source: https://jupyterlab.readthedocs.io/en/stable/developer/extension_dev.html#extension-authoring

@monuelo
Copy link

monuelo commented Oct 20, 2019

@CermakM jupyter lab extensions are npm packages that have a jupyterlab key in its package.json which has "extension" metadata. The value can be true to use the main module of the package, or a string path to a specific module (e.g. "lib/foo").

@CermakM
Copy link
Owner Author

CermakM commented Oct 21, 2019

@hericlesme A short note ... First, we should check whether the goal of executing custom JS scripts and linking custom JS libraries is actually feasible in Jupyter Lab. For that, the extension itself might not be needed (maybe it can be done directly from the notebook) --- if you want to start with the extension right ahead, however, it works as well of course :)

@monuelo
Copy link

monuelo commented Oct 27, 2019

@CermakM
Copy link
Owner Author

CermakM commented Oct 27, 2019

@hericlesme This is certainly NOT what we wanna use. This is nothing but an eval wrapper around the JS code -- way too dangerous.

We want to dig a bit deeper and allow Python-JS communication via comms, in the same way, as we do it in Jupyter Notebooks.

@monuelo
Copy link

monuelo commented Oct 27, 2019

@CermakM So, apart from that, can we go to the extension?

@CermakM
Copy link
Owner Author

CermakM commented Oct 27, 2019

I think that's a reasonable strategy. Let's create the Jupyter Lab extension for jupyter-require, load it, and see what works and what doesn't. 😬

EDIT: Don't know if you were talking about the javascript-extension that you mentioned above, but we're certainly not gonna use it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
task Task
Projects
None yet
Development

No branches or pull requests

2 participants