Jupyter4Science / scipy2024-jupyter-widgets-tutorial

SciPy2024 Tutorial on "Building Complex Web Applications with Jupyter Notebooks"
Apache License 2.0
5 stars 6 forks source link

Add pydantic/ipyautoui version of dashboard #5

Closed mwcraig closed 4 months ago

mwcraig commented 5 months ago

This PR adds a draft of the pydantic/ipyautoui version of the dashboard.

mwcraig commented 5 months ago

@nicole-brewer @JuanCab -- this is ready for a look.

I haven't written the answers yet, but will work on that later today or tomorrow.

I know I want to add a bit more to the ipyautoui widget (i.e. more in notebook 3b) and to save that to a python module.

The notebook I added, 3c, is a possible extension we could plan to do, or include but do only if time permits, or drop.

Feedback is very much welcome, especially in places where you find it confusing.

mwcraig commented 5 months ago

@jgunstone @ollyhensby -- I wanted to let you know that we're planning to use/promote ipyautoui as part of a widget tutorial at SciPy 2024. Any feedback is welcome (note these are not fully polished yet)...and if you find anything here that might be useful to the ipyautoui documentation feel free to use it.

But mostly thanks again for writing ipyautoui -- it is so much easier than doing widgets by hand!

jgunstone commented 4 months ago

hi @mwcraig - this is great news, thanks for letting us know. We're so happy that you're enjoying using 'ipyautoui', and that it will feature in your tutorial at SciPy. I'll take a look over the notebooks when I get a chance and will defo harvest for the docs :) thanks again

mwcraig commented 4 months ago

Do you want to create a version fo the entire dashboard using the pydantic/autoui code? If you do, it could illustrate how much more compact that code is.

:rofl: I had sort of forgotten until I reviewed #8 that there was more to the dashboard than these controls.

mwcraig commented 4 months ago

Thanks for the review -- I'll plan on making the revisions Friday morning.

mwcraig commented 4 months ago

@nicole-brewer @JuanCab -- I've done a fairly extensive rewrite of this. The first notebook walks through pydantic and mentions ipyautoui. The second discusses ipyautoui some more. The third has class-ified versions of the remaining widgets, and introduces adding traitlets to a class. The fourth assembles the pieces into the dashboard and introduces link as another way to accomplish what observe does.

I'm looking forward to your feedback on this and am happy to drop/rearrange/expand as needed. I'm a little worried I went overboard here...

JuanCab commented 4 months ago

I performed a code review the afternoon of June 24. I did check all the %answer worked as expected...

JuanCab commented 4 months ago

03e_more_ipyautoui_pydantic.ipynb contains the misspelt SmoothingSetttings instead of SmoothingSettings (where I stutter less with the t).