-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Explore API implications for allowing multiple notebook extensions to share the same file format #106694
Comments
|
Notebook document/cell metadataPrerequisites: content provider and kernels providers are contributed by separated extensions Jupyter content provider is responsible for parsing the file based on the file format (jupyter nbdocument v4 or v5). However the kernels/frontends usually involve faster than the document schema, the content provider should be flexible enough to allow kernels to insert additional custom document or cell metadata. For example, currently there are no identifiers for cells but if a kernel can support that, it can save it into To support this scenario, we may want to enrich the document/cell/output metadata interface *Metadata {
runnable?: boolean;
...
// transient custom metadata
transient?: { [key: string]: any };
// other custom metadata
[key: string]: any
}
|
How would extensions contribute features based on contextNow that the jupyter content provider is contributed by a shared/common extension, language extensions can fully focus on language related business, but they need a bit more information from either the core or the content provider if one particular feature should be enabled:
|
A shorter summary of API implications if the content provider will be shared between multiple extensions:
Notes: While doing above analysis, a question occurred to me "what is the scope of the shared jupyter extension". The traditional Jupyter consists of two process: Kernel
and Frontend, which does all the rest
The current implementation of Jupyter notebook support in VS Code almost follows this model, with one exception that VS Code is the User Interface and the Python extension handles the document and kernel management. If we move the jupyter content provider from Python extension to a shared extension, where should the kernel management go?
|
Closing as we already shipped the serialzier API. |
Currently the notebook API consist of three parts: content persistence (content provider), notebook execution (notebook kernels) and output rendering (output renderers). This abstraction can help reduce redundant code, for example, .NET and Python Jupyter notebooks can share the same content provider as the parsing/persisting logic is identical.
However, it's not clear yet how language extensions would opt-in if the content provider is shared. One example is how would a .NET extension decide if it should contribute actions/commands to the editor title bar / context menu in a
ipynb
files.The text was updated successfully, but these errors were encountered: