refactor(structure_tree): consolidate StructureTreeModel into data_models and remove duplicate widget implementation#236
Open
Arbaaz123676 wants to merge 2 commits into
Conversation
for more information, see https://pre-commit.ci
Author
|
@IgorTatarnikov I have consolidated StructureTreeModel into data_models/structure_tree_model.py and removed the duplicate from structure_view.py, with all changes validated locally in napari. I’m happy to make additional changes required. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #236 +/- ##
==========================================
+ Coverage 97.03% 98.02% +0.99%
==========================================
Files 14 14
Lines 640 556 -84
==========================================
- Hits 621 545 -76
+ Misses 19 11 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
What is this PR
Why is this PR needed?
The structure tree model (
StructureTreeModelandStructureTreeItem) was previously defined in bothdata_models/structure_tree_model.pyandwidgets/structure_view.py. This duplication increased maintenanceoverhead and risk of inconsistent behaviour.
What does this PR do?
structure_view.pydata_models/structure_tree_model.pyReferences
Fixes: #232
How has this PR been tested?
Is this a breaking change?
No. This refactor does not change public APIs or user-facing behaviour.
Does this PR require an update to the documentation?
No documentation changes are required as functionality remains unchanged.
Checklist: