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

Don't use StringEnum subclasses over Qt Signal definition #104

Merged
merged 4 commits into from
Sep 24, 2024

Conversation

dalthviz
Copy link
Member

@dalthviz dalthviz commented Sep 19, 2024

Closes #94
Closes #103

@dalthviz dalthviz changed the title Don't use StringEnum subclasses over Qt Signal definition Don't use StringEnum subclasses over Qt Signal definition Sep 19, 2024
@dalthviz dalthviz self-assigned this Sep 19, 2024
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.52%. Comparing base (9be404a) to head (f7b8f1f).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #104      +/-   ##
==========================================
- Coverage   93.57%   93.52%   -0.06%     
==========================================
  Files          10       10              
  Lines        1822     1822              
==========================================
- Hits         1705     1704       -1     
- Misses        117      118       +1     

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

@jaimergp
Copy link
Contributor

LGTM, but is there a way we can test this breakage? We didn't catch this bad crash before.

@dalthviz
Copy link
Member Author

dalthviz commented Sep 20, 2024

The thing that was causing the tests to not fail was that the validation that skipped the whole test_qt_plugin_dialog module was skipping it always if we were testing with PySide2 (due to an or instead of an and in the validation). The related change to prevent that is at: https://github.com/napari/napari-plugin-manager/pull/104/files#diff-7974331479a4c742a92ad157da87de3e8f3b2a5ec09707b208b4ca377c2bd6caL17-R17

With the change done, now the module gets skipped only when actually is necessary (when using Python >3.10 and PySide2). This skip is needed since there are no wheels for PySide2 5.15 for Python >3.10. Trying to install PySide2 causes PySide2 5.13 to be installed with Python >=3.11 and that comes with some issues.

I also checked that reverting the Signal change, while keeping the change for the validation to apply the skip, causes the tests (test_qt_plugin_dialog) to fail:

  • Without the Signal definition change but having the validation change on Windows with Python 3.10:

imagen

  • With the Signal definition change and also the validation change on Windows with Python 3.10:

imagen
imagen

@psobolewskiPhD
Copy link
Member

Amazing sleuthing as always @dalthviz
❤️

@jaimergp
Copy link
Contributor

Ok, thank you so much for the detailed explanation. Always a pleasure, let's merge this one.

@jaimergp jaimergp merged commit a764714 into napari:main Sep 24, 2024
11 of 12 checks passed
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.

Napari 0.5.3 installed from bundle file is interupted when installing plugins on UI Failing test with Pyside
3 participants