-
Notifications
You must be signed in to change notification settings - Fork 505
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-render source files #107
Comments
A potentially wacky solution would be to use jupytext (for python files) to convert into notebooks (and optionally populate cells in a modular fashion using jupytext syntax) before serving |
In the context of the material design widgets, I see also a use case where 'cell output' does not exist. Only widgets, with a particular 'id', on where that widget should end up in the template. For the source file, I think the simplest approach would be to see it as a single cell and fully rely on display (or the last expression) for visualization. Using display also allows for markdown etc. |
Have y'all explored the idea of using cell metadata for this? That's what I use in jupyter book and it works pretty nicely (e.g.: https://jupyter.org/jupyter-book/features/hiding.html#hiding-code-cells-and-displaying-a-button-to-show-them) |
I think jupytext support would be nice, but I think we should also have pure Python support, or C++ even. We could rely on using |
I think if we want to support this, we may want to reconsider the extension. What if we have both |
@choldgraf we sat together for a few minutes with @mwouts and got this to work with The two action items to get this in are
|
I think this is good material for the dashboarding workshops! |
amazing! very cool :-) |
@choldgraf , it's good to see you here! I see that you contribute to every fun project 😄. And thanks for mentioning Jupytext! @SylvainCorlay, is it correct that you would like
|
That is correct! |
Perfect. I have prepared (but not tested) this branch. In that branch, the Also, in the server extension, can you think of a better way than app.cm_class is jupyter_server's cm_class to detect that the app is a |
I have prepared a RC for this:
That version derives a Jupytext contents manager from the ServerApp's one. Could you please let me know if it makes the job? Thanks! Also I see that I never commented on this:
Jupytext's contents manager will do that for you. If there's no kernel in the text file, then it will choose one kernel that matches the inferred notebook language. |
How should we proceed, do we want native .py support (basically requiring you to use display(), or inject the code into in a single cell). Should we rely on jupytext only, or document how to do this with jupytext. @mwouts could you lay out what would be the advantage of jupytext over simple |
Nice question @maartenbreddels . That's a good opportunity to review my expectations for Jupytext 😄 My expectations are:
If you want to test that yourself on random files, the simplest way is probably to install Jupytext and see how your favorite files open as notebooks in Jupyter (simple click in Jupyter notebook, right-click and Open as Notebook in JupyterLab).
|
I think we can close this one as it was implemented. |
This is a usecase that is not handled by the voila, and was supported by @pbugnion's
ipywidgets_server
.To handle that case, we need to figure out how to
The text was updated successfully, but these errors were encountered: