Hi,

Thanks for the pointers.
I will have a look at how to reuse the Jupyter components like that example.

I agree that technically it *could* be a notebook sidecar, or a JupyterLab
extension.
Especially JupyterLab is basically a thing for opening files, which might
as well be schematics.
The concern is mainly that most analog IC designers hate programming, so
while I want to support strong scripting capabilities, it should not be
primarily a programming environment.
My use of notebooks is more like this dashboard thing you shared, where the
code might be collapsed by default.

Cheers,
Pepijn

On Thu, May 6, 2021 at 12:53 PM Michał Krassowski <
krassowski.mic...@gmail.com> wrote:

> Hi Pepijn,
>
> I am not an expert on embedding notebook application inside of another app
> (but this can surely be done in multiple ways, including re-using
> jupyterlab components, e.g.
> https://github.com/jupyterlab/jupyterlab/tree/master/examples/notebook),
> but I have some thoughts on the potential of doing the things the other way
> around (which I believe would be an easier and more user-friendly solution).
>
> > So it definitely makes no sense to embed the whole thing INSIDE a
> notebook.
>
> Maybe not inside a notebook, but why not inside JupyterLab? Actually, why
> not - your editor could be an output of a cell which can be separated into
> a tab/area using e.g. sidecar (
> https://github.com/jupyter-widgets/jupyterlab-sidecar). There are quite a
> few complex widgets (i.e. fully functional editors on their own) like that.
>
> > Maaaaybe the entire editor could be a mimerender plugin, but that still
> doesn't answer the question how the editor can run simulations in a
> notebook (which plots the results) and then back-annotate results into the
> schematic.
>
> There are some projects which blur the boundary between notebook and an
> external editor, e.g.:
> - https://github.com/deathbeds/ipydrawio (see demo on
> https://youtu.be/TG0w6WLunTk?t=2617, about 48th minute until 55th minute)
> -
> https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor
> - https://github.com/voila-dashboards/voila-gridstack
> - https://github.com/RoboStack/jupyter-ros (see a demo in
> https://blog.jupyter.org/jupyterlab-ros-3dc9dab7f421)
>
> Have a look at the source code of the above to get a better idea, but one
> possible solution is to rely on saving/reading to and from metadata of the
> notebook and using the shared file for communication.
>
> Best wishes,
> Michał
>
>
> On Thu, 6 May 2021 at 10:06, Pepijn de Vos <pepijnde...@gmail.com> wrote:
>
>> Hey,
>>
>> I am interested in integrating notebook functionality into my application.
>> I noticed that VS Code seems to have a custom frontend, and was wondering
>> how this is done?
>>
>> I found documentation about the REST API, which seems to be for managing
>> content, kernels, sessions, etc.
>> https://jupyter-server.readthedocs.io/en/latest/developers/rest-api.html
>>
>> And I found documentation of the kernel zmq protocol, which seems to be
>> at a lower level.
>> https://jupyter-client.readthedocs.io/en/stable/messaging.html
>>
>> I had a look with the web inspector at a running Jupyter Lab which seems
>> to use a websocket for executing code and drawing figures and widgets.
>> With some copy-pasting I was able to execute a bit of code and get a
>> reply.
>> But I can't find any documentation on this websocket protocol.
>> I'm particularly concerned about plots and widgets.
>>
>> I looked around in https://github.com/microsoft/vscode-jupyter a bit and
>> there is a lot going on. They seem to have custom implementations for all
>> sorts of widgets.
>>
>> For my usage, I think it makes more sense to embed the existing Jupyter
>> Notebook interface rather than re-implement everything from scratch. Is
>> this something that can be done at a more fine-grained level than throwing
>> the entire app in an iframe?
>>
>> The main challenge is getting interactions between my app and the
>> notebook going. For example creating and evaluating cells/notebooks. And
>> making widgets that do stuff in the rest of the app. Maybe I could write
>> extensions that offer their own API to my app?
>>
>> For context, I'm writing an app for drawing and simulating schematics.
>> Something like LTspice, KiCad, or even a bit like Simulink, for those
>> familiar with that.
>> So it definitely makes no sense to embed the whole thing INSIDE a
>> notebook.
>> Maaaaybe the entire editor could be a mimerender plugin, but that still
>> doesn't answer the question how the editor can run simulations in a
>> notebook (which plots the results) and then back-annotate results into the
>> schematic.
>>
>> Curious to hear your thoughts.
>>
>> Regards,
>> Pepijn
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jupyter+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jupyter/03ed66ab-2ffe-47cf-bf1d-66d224f513f8n%40googlegroups.com
>> <https://groups.google.com/d/msgid/jupyter/03ed66ab-2ffe-47cf-bf1d-66d224f513f8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Project Jupyter" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jupyter/vZfWNMojYa4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jupyter+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAPfyr1JKrHjhTxfDHH0o8j7FCbh-gWME8TLdQRJ125qEOLo6-Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/jupyter/CAPfyr1JKrHjhTxfDHH0o8j7FCbh-gWME8TLdQRJ125qEOLo6-Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CANPfQgvL14CRrTvJPcWOGJGQkGqH9L5iKdzDqU0zyA%2BnAKS1vg%40mail.gmail.com.

Reply via email to