-
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
Move VKCell state to TVCell #607
Conversation
Reviewer's Guide by SourceryThis PR migrates state management from VKCell to TVCell by moving key attributes such as name and shapes to the base cell (TVCell). Implementation changes include refactoring property accessors to delegate to the underlying base cell, updating transformation and shape handling methods to use the new state storage, and minor adjustments to exception handling. Updated Class Diagram for VKCell and TVCell State ManagementclassDiagram
class BaseKCell {
<<abstract>>
}
class TVCell {
- bool _locked
- dict<int, VShapes> _shapes
- str|None _name
+ get locked() bool
+ get shapes() dict<int, VShapes>
+ set shapes(dict<int, VShapes>)
+ get name() str|None
+ set name(str|None)
+ lock()
}
class ProtoKCell {
- TBaseCell _base
+ get name() str|None
+ set name(str)
+ dup() Self
}
class VKCell {
<<concrete>>
// Previously held its own _shapes and _name fields
// Now delegates state management to its TVCell base
+ transform(trans: kdb.Trans|kdb.DTrans|kdb.ICplxTrans|kdb.DCplxTrans)
+ dup() VKCell
+ shapes(layer: int|kdb.LayerInfo) VShapes
}
class LockedError {
+ __init__(kcell: AnyKCell | BaseKCell)
}
TVCell --|> BaseKCell : extends
VKCell --> TVCell : uses as base cell (state delegation)
ProtoKCell --> TVCell : _base reference
LockedError ..> TVCell : validates state
LockedError ..> VKCell : validates state
%% Note: The above diagram shows how state (name and shapes) management has been moved
%% from VKCell to TVCell. ProtoKCell delegates its name property to its base cell, now TVCell.
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #607 +/- ##
==========================================
+ Coverage 65.91% 66.01% +0.09%
==========================================
Files 64 64
Lines 9644 9656 +12
Branches 1786 1787 +1
==========================================
+ Hits 6357 6374 +17
+ Misses 2762 2761 -1
+ Partials 525 521 -4 ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Move the cell state from VKCell to TVCell.
New Features:
shapes
property to TVCell to manage shapes by layer.Enhancements: