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

refactor: extract GUI-specific logic to GUI folders #112

Merged
merged 2 commits into from
Jan 19, 2025

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Jan 19, 2025

this is a bit of a reversal of #75 ... but probably much better than the state of things before #75.

basically: trying to get all the gui-specific stuff back into their own folders. This creates a base NDVapp class that GUI frameworks have to implement to be supported. (its the same as the current GUIProvider object).

it does move a little bit of logic for each framework back into _app.py, mostly the "is_running" logic. but by having just that logic there, it allows all the rest to go back to the proper folder

this also fixes a bug wherein if you explicitly use NDV_GUI_FRONTEND=qt inside a jupyter notebook. it still doesn't let you use a Qt widget.

Copy link

codecov bot commented Jan 19, 2025

Codecov Report

Attention: Patch coverage is 67.02509% with 92 lines in your changes missing coverage. Please review.

Project coverage is 72.43%. Comparing base (2fdb603) to head (3e07907).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ndv/views/bases/_app.py 58.66% 31 Missing ⚠️
src/ndv/views/_qt/_app.py 75.36% 17 Missing ⚠️
src/ndv/views/_wx/_app.py 67.30% 17 Missing ⚠️
src/ndv/views/_jupyter/_app.py 60.00% 16 Missing ⚠️
src/ndv/views/_app.py 73.80% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
+ Coverage   72.29%   72.43%   +0.14%     
==========================================
  Files          44       48       +4     
  Lines        4595     4622      +27     
==========================================
+ Hits         3322     3348      +26     
- Misses       1273     1274       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tlambert03 tlambert03 changed the title refactor: extract backend specific logic to backend folders refactor: extract GUI-specific logic to GUI folders Jan 19, 2025
@tlambert03 tlambert03 merged commit 133f7c1 into pyapp-kit:main Jan 19, 2025
51 of 52 checks passed
@tlambert03 tlambert03 deleted the app-refactor branch January 19, 2025 20:30
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.

1 participant