Skip to content
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

Cell and notebook reflection API #88

Open
6 of 10 tasks
altavir opened this issue Jul 19, 2020 · 1 comment
Open
6 of 10 tasks

Cell and notebook reflection API #88

altavir opened this issue Jul 19, 2020 · 1 comment

Comments

@altavir
Copy link
Contributor

altavir commented Jul 19, 2020

This issue is actually an extension of #78. The idea is to have interfaces that define cell and notebook status. Those interfaces should be placed in an external artifact that is available to plugin and library developers. When inside the notebook the instances of those interfaces could be obtained as implicit calls. My idea is that the whole code executed in a cell should be done with a cell receiver. During notebook execution, this cell receiver is substituted by the actual cell object.

The following features should be supported.

Cell:

  • val id: String. A unique cell id.
  • val notebook: Notebook. Get a reference to a current notebook.
  • val/var text: String. The code inside the cell (see Support for input/output caching #76 ).
  • val output: MIMEContainer. The output as MIMEContainer.
  • val rawOutput: String. Raw output.
  • Specific notebooks controls like hide input/output.
  • Execution controls. Maybe asynchronous cell result.

Notebook:

  • Kernel handle.
  • A collection of resource handles with the possibility to inject new resources in runtime (see Load static resources via module descriptions #74 ). The resources must provide asynchronous load handles or a javascript promise name so one could organize asynchronous loading of widgets.
  • Find a Cell by id.
@breandan
Copy link
Contributor

breandan commented Jul 27, 2020

May be unrelated, but it would be nice to have hooks into the Jupyter notebook rendering system in order to display custom result types (e.g. Javascript, Latex, Markdown, SVG) similar to how the Python API is implemented. Skimmed the code and it looks like some are already supported, but perhaps I missed the other MIME types.

edit: Ah, this looks like a duplicate of #12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants