Comments (7)
Some ideas for having server extensions as federated extensions:
- a
cookiecutter-jupyterlite
repo similar to https://github.com/jupyterlab/extension-cookiecutter-ts (maybe a fork?), but forJupyterLiteServerPlugin
plugins (example: https://github.com/jtpio/jupyterlite/blob/main/packages/javascript-kernel-extension/src/index.ts) - distributed as a Python package, with the prebuilt assets going under
$PREFIX/share/jupyter/liteextensions
- the
jupyterlite
cli would also be able to install these extensions from$PREFIX/share/jupyter/liteextensions
by moving them tolite/extensions
- extension authors use the same workflow as for normal jupyterlab extensions, with
@jupyterlab/builder
under the hood. Maybe we can even leverage the--core-path
option to not have to add anotherlite
layer on top of it. - extension authors can then publish their server extension to PyPI, and simply
pip install
it when they follow a Python drivn deployment
from jupyterlite.
Had a look at this, appears to be a pretty deep well. I got up to where i was loading federated_extensions
, but then fell over once they tried to resolve the "known-first-party" stuff. Definitely seems doable, though.
from jupyterlite.
Thanks!
Had a look at this, appears to be a pretty deep well. I got up to where i was loading
federated_extensions
, but then fell over once they tried to resolve the "known-first-party" stuff. Definitely seems doable, though.
Do you want to open a draft PR even if it's still a work in progress?
In JupyterLab Classic support for federated extensions is implemented in a very similar way as in the lab examples:
- https://github.com/jtpio/jupyterlab-classic/blob/main/app/index.js and https://github.com/jtpio/jupyterlab-classic/blob/main/app/webpack.config.js
- https://github.com/jupyterlab/jupyterlab/tree/master/examples/federated
Add federated_extensions to pageInfo and the machinery to load them.
Don't we also need a way to create or maintain a list of the installed federated extensions? Since there is no server, not sure we can do something like in jupyterlab_server
: https://github.com/jupyterlab/jupyterlab_server/blob/8bcdf52a06bd81e649825e153a3f93947064fe23/jupyterlab_server/config.py#L39
from jupyterlite.
Also we can limit the scope of this issue to getting the federated extensions (JupyterFrontEndPlugin<any>[]
) to work with JupyterLab (and JupyterLab Classic).
Then it would be really nice to be able to add support for "server extensions" too (JupyterLiteServerPlugin<any>[]
). Maybe those could go under lite/extensions
or something like this. So folks could for example provide additional kernels via a federated extensions, or even swap core services like the contents manager (similar to https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html?#disabling-other-extensions)
from jupyterlite.
PR up, super broken, probably didn't copy-pasta the right stuff.
add support for "server extensions"
yeah, would be very good.
from jupyterlite.
for sure, we need some plan. of course my preference would be that they would Just Work ™️ with existing stuff, deployed to labextensions
, with sharedPackages
tricks, etc. but i haven't really looked into it, but a jupyter litextension
toolpath would certainly be acceptable for people that have decided to throw some weight around, e.g. jupyterlap-lsp
, @jupyterlab/pullrequests
.
However, we have the opportunity to do something quite interesting to obviate the need for a lot of jumping jacks in the simplest case, e.g. jupyter-videochat
, jupyter-server-proxy
, etc. that can be faked with static, per-site data, with first-party solutions, e.g. @jupyterlite/openapi
, @jupyterlite/asyncapi
.
- Given I am a JupyterLite deployer
- and I lack typescript skills
- and I really want to use an existing extension
- but it has a hard serverextension requirement
- and I can predict what a "valid" response will be
- and I can use existing OpenAPI/AsyncAPI tooling to describe/validate my description of it- when I add an OpenAPI/AsyncAPI spec to my
jupyter-lite.json
- and provide somedefault
values- when a user visits my site
- then it will run without error
I imagine convenience tooling (e.g. YAML ingesting), much like for .whl
ingesting, etc. though it should be possible to do it entirely with schema-validateable JSON-banging.
Indeed, these contracts might be an even better API than the existing imperative get
, put
, etc. and "heavyweight" extension authors may wish to use them. In an ideal world, "real" serverextensions would also have to provide/generate this information.
from jupyterlite.
I think we're pretty good here, I'll open (ha) the OpenAPI thing as a separate issue.
from jupyterlite.
Related Issues (20)
- Improve the handling of invalid config files
- infinite scrolling loop HOT 4
- No content appears, `all.json` never generated despite content copied to `.../files/` HOT 2
- Collapsable cells HOT 2
- string saved to file has last part repeated (sometimes) HOT 2
- rendering cell output different from rendering same in file (unwrapped, directly in browser) HOT 3
- Widgets don't work with `display(...)`, and instead only appear as `repr(...)` text unless `jupyterlab_server` is installed before `lite build`, but there's no indication it's a requirement HOT 4
- Some extensions cannot be disabled using `disabledExtensions` HOT 3
- Pyodide crashes when starting two pyodide kernels at the same time in Chrome HOT 7
- Allow to pre-populate the REPL prompt without executing the code
- Deploying in environments with credentials HOT 1
- Pressing "Restart and run all cells" randomly causes silent pyodide kernel crash HOT 2
- Pyodide becomes irresponsive after a few ipywidgets interactions HOT 5
- Explicit index.html dropped from path in notebook ToC links
- Delete current notebook option from notebook File menu HOT 1
- ipywidgets Installation issue HOT 1
- DriveFS cannot overwrite-truncate existing file HOT 1
- Add a noscript tag to the page with "js must be enabled" ?
- Fix workflow to update the playwright snapshots HOT 1
- Unable to create a New Notebook HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jupyterlite.