-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix KCLayout.clear_kcells #602
Conversation
Reviewer's Guide by SourceryThis pull request addresses issues in the KCLayout.clear_kcells method by ensuring that all cells are properly unlocked and pruned by calling prune_cell on the kdb_cell. In addition, a new test (test_clear_kcells) has been added to confirm that the method fully clears and destroys cells as expected. Sequence diagram for KCLayout.clear_kcellssequenceDiagram
participant L as KCLayout
participant C as KCell
participant KDB as KDB_Cell
L->>C: top_kcells()
loop For each KCell
Note over C: Process each cell
C-->>C: unlocked = False
C->>KDB: prune_cell()
end
Updated class diagram for KCLayout, KCell, and KDB_CellclassDiagram
class KCLayout {
+clear_kcells() : None
+top_kcells() : List~KCell~
-tkcells : Dict
}
class KCell {
-locked : bool
-kdb_cell : KDB_Cell
}
class KDB_Cell {
+prune_cell() : None
}
KCLayout --> "0..n" KCell : contains
KCell --> KDB_Cell : delegates pruning
note for KCell "Previously: tc.prune_cell()\nNow: tc.locked = False and tc.kdb_cell.prune_cell()"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #602 +/- ##
==========================================
+ Coverage 65.87% 65.93% +0.05%
==========================================
Files 64 64
Lines 9642 9643 +1
Branches 1785 1785
==========================================
+ Hits 6352 6358 +6
+ Misses 2768 2761 -7
- Partials 522 524 +2 ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Tests:
test_clear_kcells
to test clearing kcells in a layout.