-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Add optional packages jupyterlab, jupyterlab_widgets to support interacts in JupyterLab #30246
Comments
comment:1
Could this just be a documentation issue? Is it documented somewhere what extensions need to be installed in jupyterlab so that sage works? |
Dependencies: #26059 |
comment:3
Replying to @mkoeppe:
I was able to get interacts working in jupyterlab 2.2.5 using the following command:
This requires nodejs >= 10 to be installed though. Looks like jupyterlab's extension ecosystem is all based on npm. Grabbing the extension tarball directly, still need node for bundling. (webpack, if I remember; been awhile since I've done anything with node.) So unless we want to make nodejs an optional->standard package as well, maybe just leave it to the user to install and make a note in the documentation regarding interact functionality? Similar to how imagemagick and ffmpeg are noted in animated plots. |
comment:4
Is installation via https://pypi.org/project/nodeenv/ an option? |
comment:5
Replying to @mkoeppe:
Cool stuff. I was indeed able to get interacts working without a system nodejs using Not having node though does prevent you from browsing/installing other extensions in the extensions sidebar of jupyterlab. I played around with modifying the main sage script to activate the nodeenv when using I'll continue experimenting with this for a bit longer, do some tidying up, and push a branch for review. |
Commit: |
Author: Joshua Campbell |
Branch: u/gh-jcamp0x2a/30246 |
comment:6
I've pushed a branch for review. It adds 4 new optional packages: nodeenv, nodejs, jupyterlab, and jupyterlab_widgets. The last one, jupyterlab_widgets, gets you everything. I opted to break them up in this way for (1) convenience in packaging them and (2) flexibility in installing them. For example, if you just want the JupyterLab client and don't care about interacts or other extensions or if you don't want JupyterLab but would like nodejs present in your Sage environment for some other purpose. Please let me know if you'd prefer a different structuring. Shell scripting isn't my forte, so I welcome any feedback regarding coding conventions and best practices! |
comment:7
I suppose this also includes what should've been worked under #26059 first and separately (just the jupyterlab package). I apologize for that; got carried away :) |
Changed dependencies from #26059 to none |
comment:8
Replying to @jcamp0x2a:
We can mark the other ticket as solved by this one. I would use https in the home page url for JupyterLab. |
comment:10
This looks great overall. I'm getting the following with this branch (without installing any packages):
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
Thank you for catching that! I've pushed a couple more changes, the first making sure to check that Oh, do you happen to know of a good way to uninstall Sage packages? I tested these last couple changes by manually removing/moving files around in SAGE_LOCAL. I'd like to get back to a state without, for example, jupyterlab for testing, but I'd also like to avoid having to do a full clean and rebuild. I suppose I could be doing this in a VM and just snapshot and rollback. |
comment:15
This ticket breaks the patchbots (at least the ones i run). It seems due to some modification in
They get:
The error should be catched (e.g. stderr could be redirected to |
comment:19
Replying to @jcamp0x2a:
Would it perhaps be better to direct the user to do |
comment:20
Also, could you update the help messages in |
comment:21
on macOS:
|
comment:22
|
comment:24
Replying to @mkoeppe:
I will update the message to suggest jupyterlab_widgets by default, with a short aside about a minimal installation using just jupyterlab. Replying to @mkoeppe:
I will add mention of jupyterlab to the help messages. I'm not sure I understand you about the default. The help messages I see list jupyter as the default, and indeed running Replying to @mkoeppe:
I should know better. I remember this bit me on Solaris a few years ago, too. I will fix this. |
comment:26
Upon re-reading the basic help message, I saw what you mentioned about the default needing to be updated. I've pushed changes that I believe address your feedback items. I also came across
Looking at the code in |
Changed branch from u/gh-jcamp0x2a/30246 to u/mkoeppe/30246 |
Reviewer: Matthias Koeppe |
comment:28
This works for me on macOS and is looking great overall. I have added dependencies to make sure that a parallel build works correctly. New commits:
|
comment:30
Replying to @mkoeppe:
Awesome! Thank you for all your time and assistance on this ticket. |
Changed branch from u/mkoeppe/30246 to |
comment:32
Minor booboo : after (successful) installlation,
Untidy, and potentially confusing... |
Changed commit from |
comment:33
I believe the version in parentheses is the installed version while the other is the available version. I'm not sure why the available version isn't displayed since there is a package-version.txt present for jupyterlab_widgets, but I'm thinking this may be a problem for "script" packages in general. For example:
|
comment:34
Has anyone figured out how to use MathJax in JupyterLab markdown cells? |
Before this ticket: interacts don't work in JupyterLab.
Reported at:
Related:
CC: @slel
Component: interact
Keywords: jupyterlab
Author: Joshua Campbell
Branch:
e169060
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/30246
The text was updated successfully, but these errors were encountered: