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

Widget demo example script #36

Merged
merged 3 commits into from
Jul 23, 2020

Conversation

GenevieveBuckley
Copy link
Contributor

I thought it would be good to have an easy to run example script showcasing all the widget types supported by magicgui.

Right now there's nowhere in the docs or examples that explains all the different types of widgets you can have. I personally learnt most of what I know about the Gooey from their widget demo script, so that's a big motivation to include something similar here.

Copy link
Member

@tlambert03 tlambert03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it! I was gonna say add a slider... but I think we need to have our own API for that (rather than using "widget_type: QSlider"). So lets' add that once we have it.

thanks!

@GenevieveBuckley
Copy link
Contributor Author

love it! I was gonna say add a slider... but I think we need to have our own API for that (rather than using "widget_type: QSlider"). So lets' add that once we have it.

I forgot about sliders! I'm not sure what you mean by "we need to have our own API... let's add that once we have it", can you elaborate? Ideally I'd like to include as many things as possible into the examples.

@tlambert03
Copy link
Member

I mean that every feature should have some “magicgui” representation/API that we wouldn’t mind reusing even if we switched to another backend. So we should be able to do widget_type=slider where “slider” means something special in magicgui. Not for this PR of course... just that I’ve never liked how you’re supposed to ask for a slider. (I imagine there are other cases too, where there are multiple suitable widgets for a given type)

@codecov
Copy link

codecov bot commented Jul 21, 2020

Codecov Report

Merging #36 into master will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
- Coverage   95.82%   95.77%   -0.05%     
==========================================
  Files          14       14              
  Lines         934      923      -11     
==========================================
- Hits          895      884      -11     
  Misses         39       39              
Impacted Files Coverage Δ
magicgui/_tests/test_magicgui.py 92.06% <0.00%> (-0.13%) ⬇️
magicgui/_qt/widgets/file_dialog.py 93.75% <0.00%> (-0.10%) ⬇️
magicgui/_qt/_qt.py 95.06% <0.00%> (-0.07%) ⬇️
magicgui/_tests/test_ qt.py 98.93% <0.00%> (-0.05%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db4c816...49b6c48. Read the comment docs.

Copy link
Contributor

@jni jni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@tlambert03
Copy link
Member

I'm going to merge this, we can continue to embellish this example as the "showroom" script as we add more widgets and/or simplify the API. thanks @GenevieveBuckley

@tlambert03 tlambert03 merged commit ad79e0a into pyapp-kit:master Jul 23, 2020
@GenevieveBuckley GenevieveBuckley deleted the widget-demo branch July 23, 2020 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants