-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Distribute the extensions as Python packages #243
Conversation
The $ jupyter labextension develop . --overwrite
Installing /path/to/repo/jupyter-renderers/jupyterlab-renderers/labextension/@jupyterlab/fasta-extension -> @jupyterlab/fasta-extension
Building extension in /path/to/repo/jupyter-renderers/jupyterlab-renderers
An error occured.
FileNotFoundError: [Errno 2] No such file or directory: '/path/to/repo/jupyter-renderers/jupyterlab-renderers/package.json'
See the log file for details: /tmp/jupyterlab-debug-mn3dgl19.log
|
Some of these are alternatives that don't make sense to install together. For example, it doesn't make sense to install both mathjax 3 and katex as they stomp on each other to be the builtin math renderer (and disable the builtin mathjax 2 renderer). I was thinking about this when upgrading to jlab 3, and how we make prebuilt extensions. I think we can either have multiple python packages in this repo, or split things out to multiple repos (which I think would make updates and maintenance onerous). I would suggest multiple python packages in this repo over splitting things out into multiple repos, at least as a first experiment. |
Right. This sounds like we will end up with a "Python monorepo", so this might add some complexity especially if we want to keep some files like Agree it's still better than maintaining multiple repos 👍 |
The closest we have to this for now is probably the Extension Examples repo: https://github.com/jupyterlab/extension-examples |
597bd0d
to
68cba44
Compare
So the repo is now a collection of Python packages. Each of the extensions was updated using the upgrade script: python -m jupyterlab.upgrade_extension .
The |
"outDir": "lib", | ||
"rootDir": "src", | ||
"lib": ["es2015", "dom"] | ||
"skipLibCheck": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skipLibCheck
wasn't originally used, but updating the dependencies led to TS compile errors for what looks like conflict with the underlying vega-lite
dependency:
https://github.com/jupyterlab/jupyter-renderers/runs/2033195852
node_modules/vega-lite/build/src/compile/selection/selection.d.ts(11,10): error TS2440: Import declaration conflicts with local declaration of 'SelectionComponent'.
node_modules/vega-lite/build/src/log.d.ts(23,5): error TS2416: Property 'level' in type 'LocalLogger' is not assignable to the same property in base type 'LoggerInterface'.
Type '() => this' is not assignable to type '{ (_: number): this; (): number; }'.
Type 'this' is not assignable to type 'number'.
Type 'LocalLogger' is not assignable to type 'number'.
So leaving skipLibCheck: true
to make it simpler for now since Vega 3 is deprecated.
Keeping the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Needs a rebase for the yarn lock.
Thanks! |
I've published these python packages, and added you, @jtpio as a publisher as well on pypi. |
I guess next up is making conda-forge feedstocks, if we want to go that far? |
Perfect, thanks!
Probably yes. Maybe it's possible to generate most of the recipes with grayskull and submit a single PR to add them all at once. |
Opened conda-forge/staged-recipes#14245. Recipes were generated with: grayskull pypi jupyterlab-fasta jupyterlab-geojson jupyterlab-katex jupyterlab-mathjax3 jupyterlab-vega2 jupyterlab-vega3 |
Fixes #235
This takes the approach of packaging all the extension at once into ajupyterlab-renderers
package.~So a
pip install jupyterlab-renderers
will install all the extensions.`Edit: Each extension is distributed as its own Python package.
TODO
@jupyterlab/fasta-extension
jupyter labextension develop
script can be used with multiple packages and this setup