-
Notifications
You must be signed in to change notification settings - Fork 276
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
Voila + JupyterLite #773
Comments
As long as it has all the machinery to do the rendering in the browser, this is great... mostly because, at present, we don't have a better way for apps to participate in the MIMO-with-shared-webpack-chunks. But notebooks-as-authored-in-lite-as-dashboards is definitely a marquee feature.
I think we've been trending more towards "branding-neutral" names in URLs (e.g.
As suggested above, as not everyone site would want this, I think it should likely be opt-in, and have an extra dependency (e.g. |
IMO staying with
Maybe through the |
More specifically, I mean the build-time pre-rendering and dependency on If it piggy-backs of |
Morning idea: At build time: Instead of pre-rendering all the Notebooks -> pre-render all the Voila templates with empty cells content. At runtime: We inject any Notebook cells content (in some JS logic) in the pre-rendered voila template the user is requesting -> no need for nbconvert at runtime. |
What we wantA Voila app in JupyterLite?An in-browser Voila "server" that would serve a dashboard upon HOW?idea1: Run nbconvert in the browser to generate the dashboard upon request?pros:
cons:
idea2: Pre-render all Notebooks into Voila dashboards during the
|
Roughly in order of my perceived value, trying to keep the "lite" accurate for both developers and users.
The (optional) pre-render plan is a good first step as the complexity can be contained within the (optional) build addon. If we pair that with the #165 labextension and serverextension (or even a widget), the user story of.. As a future site owner
In order to build a nice site
Given I have full JupyterLab
When I change a notebook
And I press a button
Then I see a lab or browser tab preview of dashboard
And I press another button
Then my site is deployed
And I can repeat the process ...will be really solid: this was actually the original impetus behind using:
If we ever got that self-hosted in-browser, that would really be something, and worth an extension that did include the whole build chain, used a kernel, etc. We should not try to do that before 0.1.0 lol.
As soon as out-of-band pre-rendering works, I think we want to investigate nbconvert-in-js to enable another use case: As a current lite site user
When I visit the site
And I work on a notebook
When I press a button
Then I see my dashboard
And I can download my notebook
And submit it I think nunjucks is going to get us the closest, as it has jinja2 compatibility as a goal, and can be run asynchronously. We should try to write this in as-standalone-as-possible way (e.g. sans-io, no react, no lumino, etc) as this would actually be really useful in other contexts if it was lightweight enough.
This kinda could be made to work today... but should not be our go-to... things like I point out some future work there: basically, we would either need to patch, or convince
this is... a lot. I actually got this to work on #497 goes further and asks for it to be self-modifiable. We do want this at some point. I think this would take some fairly advanced mechanisms to detect all the dynamism, even with a much more robust serviceworker, and would result in a titanic file, as everything (including all that wasm) would be base64 encoded. If anything, I think we would want to explore this in an out-of-band extension, and not in the core repo... if we did a really good job of documenting our build outputs, it should be possible to take a full |
@martinRenou maybe we could close this issue and continue on the Voici repo now? https://github.com/voila-dashboards/voici |
Problem
Voila + JupyterLite would be amazing.
Proposed Solution
I started looking into implementing an nbconvert exporter that exports a Notebook to a Voila app that spawns a lite-kernel and execute the code in the page. voila-dashboards/voila#1187
So far, I think the exporter only is not enough. We will need to reuse some of the federated-extensions and Addon logic from the JupyterLite CLI.
My idea is to:
/voila/render/*.ipynb
requests to the pre-rendered voilite dashboards/voila/render/notebook.ipynb
points to a Notebook that was not pre-rendered, we execute nbconvert in the page to render the Notebook, this will be way slower than opening pre-rendered dashboards, but it's a must have anyway.The text was updated successfully, but these errors were encountered: