-
Notifications
You must be signed in to change notification settings - Fork 2
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 underlying architecture of plugin for molularity and encapsulation #67
Conversation
5daa20a
to
4e35311
Compare
4e35311
to
844b239
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
==========================================
+ Coverage 91.85% 97.32% +5.47%
==========================================
Files 6 7 +1
Lines 270 299 +29
==========================================
+ Hits 248 291 +43
+ Misses 22 8 -14
☔ View full report in Codecov by Sentry. |
I am going to fix the slight decrease in coverage, but in the meantime it would be great if, @adamltyson, you could check that you agree that nothing is broken for the user by this PR (it's supposed to be a pure moving-stuff-around and communicate-via-qt-signals-instead PR) with no changes in functionality for the user? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good to me 🎉
* signal was previously not emitted properly in table view's qmenu * rename test atlas_viewer_widget > brainrender_widget * add tests for model header and additional reference context menu
Description
What is this PR
Why is this PR needed?
The
atlas_viewer_widget.py
file was becoming unwieldy to add functionality to, and things that were napari-independent were tested in a napari context as a consequence of the previous architecture (which made the tests slow, as well as violating separation of concerns).What does this PR do?
This PR splits the classes more independent and have clearer responsibilities. Some things have been renamed for clarity too.
The plugin should look and behave exactly the same as before (bar also fixing #66 )
a key advantage is better modularity
* widgets can be used and tested independent of napari (and the tests seem faster to run?)
* each file and class has clear responsibilities
* easier to add new features to because the amount of context needed to worry about at once is reduced
a downside is that there is an extra layer of abstraction in the code(but I think it's worth it!)
References
Closes #8
Closes #66
How has this PR been tested?
Tests have been refactored accordingly, and pass. Also extensive manual testing for any unintentional changes in behaviour.
Is this a breaking change?
Not for the user, big change in API which is good to be done early in the development process for this plugin
Does this PR require an update to the documentation?
Will be added as part of #52. Docstrings improved and added as needed by the refactoring.
Checklist: