GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improvements to GUI selection and Qt support by almarklein · Pull Request #431 · fastplotlib/fastplotlib

Conversation

@almarklein

@almarklein almarklein commented Mar 13, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Closes #384

  • Adds a new fpl.utils/gui module where the GUI selection is handled and nothing else.
  • Fastplotlib lists its own GUI preference order, but respects users who override it.
  • Avoid importing multiple GUI libraries.
    • This makes fpl lighter.
    • In my experience importing multiple GUI frameworks can also result in odd bugs.
    • Remove all imports of wgpu.gui.auto except in fpl.utils.gui.
    • Users can still use a custom canvas and thus mix GUI toolkits if they want to go crazy :)
  • The fpl.run() method now matches the GUI backend in use (this was not necessarily the case previously).
  • Support for all modern Qt libraries!
  • The cases where ipywidgets is imported is now conditional (only happens in Jupyter notebook / lab).

Note on performance: The import time is about 0.2 s faster on desktop (because it does not import Jupyter stuff). In the notebook we can expect a similar improvement because glfw and qt are not imported by default (when available).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
almarklein added 4 commits March 13, 2024 14:10
@almarklein
Improved GUI selection wip
9919b55
@almarklein
Support all modern qt libs
38369d8
@almarklein
comment
777cd0e
@almarklein
make the ipywidgets imports conditional
f961fad
@almarklein

almarklein commented Mar 13, 2024

Copy link
Copy Markdown
Collaborator Author

Ready for review, but I figure you may want to have a code-review before letting CI run 😄

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@almarklein almarklein mentioned this pull request Mar 13, 2024
Lazy import av #432
Merged
kushalkolar
kushalkolar requested changes Mar 13, 2024
View reviewed changes
Comment thread fastplotlib/widgets/image.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread fastplotlib/layouts/_frame/_frame.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread fastplotlib/utils/gui.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

kushalkolar
kushalkolar reviewed Mar 13, 2024
View reviewed changes
Comment thread fastplotlib/layouts/_utils.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@almarklein

almarklein commented Mar 14, 2024

Copy link
Copy Markdown
Collaborator Author

Funny how pygfx/pygfx#674 gets reported while we're working on this 😄 I think I'll put this PR on hold, and first address the GUI backend selection mechanics. I think your code to check what GUI Jupyter has integrated should be used in wgpu-py. And perhaps it makes sense to provide more ways to influence backend preference, that fpl can then use (in the new gui.py).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar

kushalkolar commented Mar 14, 2024

Copy link
Copy Markdown
Member

yup makes sense to do it upstream, less wheel reinventing 😄

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@almarklein almarklein mentioned this pull request Mar 18, 2024
sphinx gallery for docs #437
Closed
@kushalkolar

kushalkolar commented Mar 27, 2024

Copy link
Copy Markdown
Member

After pygfx/wgpu-py#478 it should be possible to greatly simplify this

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

almarklein added 5 commits March 29, 2024 11:49
@almarklein
Merge branch 'main' into gui
8bd371f
@almarklein
Adjust for new wgpu
eba3751
@almarklein
set min wgpu version
8f4a4bc
@almarklein
fixes
f21f7aa
@almarklein
top might not necessarily the default
45fe01d
@almarklein

almarklein commented Mar 29, 2024

Copy link
Copy Markdown
Collaborator Author

I made some updates to make it work with the latest wgpu. Ready from my end!

kushalkolar reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar
kushalkolar marked this pull request as ready for review March 29, 2024 19:15
@kushalkolar
kushalkolar requested a review from clewis7 as a code owner March 29, 2024 19:15
@kushalkolar

kushalkolar commented Mar 29, 2024

Copy link
Copy Markdown
Member

This is really great, thanks! 🥳 . Will merge once wgpu v0.15.1 is on pypi and tests pass

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

clewis7
clewis7 approved these changes Mar 30, 2024
View reviewed changes
kushalkolar
kushalkolar approved these changes Mar 31, 2024
View reviewed changes
@kushalkolar
kushalkolar merged commit af23b58 into fastplotlib:main Mar 31, 2024
@kushalkolar kushalkolar mentioned this pull request Apr 1, 2024
hard to interpret error in Frame.show #392
Closed
@niksirbi niksirbi mentioned this pull request Apr 30, 2024
Develop a proof-of-concept prototype for a web-based graphical interface neuroinformatics-unit/movement#164
Open
@clewis7 clewis7 mentioned this pull request May 29, 2024
sphinx gallery #509
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kushalkolar kushalkolar kushalkolar approved these changes
@clewis7 clewis7 clewis7 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Use qtpy so we can use PySide etc

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@almarklein @kushalkolar @clewis7
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.