SimonBiggs / scriptedforms

Quickly create live-update GUIs for Python packages using Markdown and simple HTML elements.
Apache License 2.0
509 stars 34 forks source link

Implement as a JupyterLab extension #161

Open SimonBiggs opened 6 years ago

SimonBiggs commented 6 years ago

Implement ScriptedForms as a JupyterLab extension.

SimonBiggs commented 6 years ago

This is now working! It is awesome! :)

image

Ahhh it looks beautiful :)

This has been implemented within the branch https://github.com/SimonBiggs/scriptedforms/tree/jupyterlab-extension

It requires JupyterLab master with the following pull request included to work: https://github.com/jupyterlab/jupyterlab/pull/4334

SimonBiggs commented 6 years ago

@OxygenLithium @robmarkcole

SimonBiggs commented 6 years ago

My first order of business will be to see if I can make print work from within JupyterLab. If I manage that then I will work on setting it up so that the JupyterLab version becomes the primary version.

Can still have the standalone version for end user GUIs, however ScriptedForms as a JupyterLab extension will be the main version.

SimonBiggs commented 6 years ago

Ahh, I can finally add ScriptedForms to the jupyterlab-extension topic list:

https://github.com/search?l=TypeScript&q=topic%3Ajupyterlab-extension&type=Repositories

robmarkcole commented 6 years ago

Fantastic!

SimonBiggs commented 6 years ago

Check it out:

image

SimonBiggs commented 6 years ago

That console on the right is a complete history of all the code that has been run and its order. Perfect for debugging. Also, you can add custom code in the console and the form variables update appropriately :) :) :D

SimonBiggs commented 6 years ago

Anyway, gotta go make dinner now :). It was fun :).

SimonBiggs commented 6 years ago

It's a serious testament to the JupyterLab team how easy it was to pull it all in. They really have made something beautiful. :).

SimonBiggs commented 6 years ago

And you can also of course attach a Notebook to the same kernel:

image

SimonBiggs commented 6 years ago

@robmarkcole this is now available in scriptedforms-0.9.1.dev2.

To get it to work though you need to install JupyterLab from the allow-angular-templates branch within my fork of JupyterLab:

https://github.com/SimonBiggs/jupyterlab/tree/allow-angular-templates

Hopefully that branch gets merged in the following pull request:

https://github.com/jupyterlab/jupyterlab/pull/4334