-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
test: Replace django mptt with django tree queries for tests #684
test: Replace django mptt with django tree queries for tests #684
Conversation
Signed-off-by: Kwong Tung Nan <[email protected]>
Signed-off-by: Kwong Tung Nan <[email protected]>
Signed-off-by: Kwong Tung Nan <[email protected]>
Signed-off-by: Kwong Tung Nan <[email protected]>
Co-authored-by: Thiago Bellini Ribeiro <[email protected]>
Co-authored-by: Thiago Bellini Ribeiro <[email protected]>
Signed-off-by: Kwong Tung Nan <[email protected]>
Signed-off-by: Kwong Tung Nan <[email protected]>
Signed-off-by: Kwong Tung Nan <[email protected]>
Signed-off-by: Kwong Tung Nan <[email protected]>
Reviewer's Guide by SourceryThis PR removes django-mptt and replaces it with treenode for enhanced performance and maintainability. The changes are primarily focused on updating model definitions, type annotations, and tests to reflect this shift. Class diagram showing the transition from MPTT to TreeNodeclassDiagram
class MPTTModel {
<<removed>>
+parent
+level
+tree_id
+lft
+rght
}
class TreeNodeModel {
<<added>>
+parent
+path
+depth
+ordering
}
note for TreeNodeModel "Replacement for MPTT implementation"
MPTTModel <|-- TreeNodeModel : replaces
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Signed-off-by: Kwong Tung Nan <[email protected]>
Signed-off-by: Kwong Tung Nan <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #684 +/- ##
=======================================
Coverage 89.00% 89.00%
=======================================
Files 42 42
Lines 3821 3821
=======================================
Hits 3401 3401
Misses 420 420 ☔ View full report in Codecov by Sentry. |
#683 got merged, can you rebase? |
…queries Signed-off-by: Kwong Tung Nan <[email protected]>
@bellini666 done 😁 |
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.
Hey @kwongtn - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Noice! ❤️
Description
As mentioned here,
django-mptt
is no longer supported.This PR removes all references to
django-mptt
(and hencemptt
in general) and replace it withtreenode
(orTreeNode
, depending on context).Should not have any effect on other code.
Merge the following first:
Types of Changes
Checklist
Summary by Sourcery
Replace django-mptt with tree_queries.
Enhancements:
Tests: