-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: return the correct size for custom container objects #547
Conversation
This is needed to correctly evaluate whether an object is worth memoizing or keeping in the cache. See for context: Safe-DS/Runner#51 and Safe-DS/Runner#44
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #547 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 50 50
Lines 2831 2852 +21
=========================================
+ Hits 2831 2852 +21 ☔ View full report in Codecov by Sentry. |
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.
Looks great. I only have a small request: Please move the new __sizeof__
methods towards the beginning of the classes, where the other dunder methods (e.g. __eq__
and __hash__
are listed). That makes it easier to find them in the rather large classes.
It's not that important how the dunder methods themselves are sorted, but if you want to follow the pattern used previously, list __init__
first and sort the rest alphabetically.
fix: count missed keys + values in schema
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.
Nice work.
## [0.19.0](v0.18.0...v0.19.0) (2024-02-06) ### Features * return the correct size for custom container objects ([#547](#547)) ([f44c34d](f44c34d))
🎉 This PR is included in version 0.19.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Summary:
This is needed to correctly evaluate whether an object is worth memoizing or keeping in the cache.
See for context: Safe-DS/Runner#51 and Safe-DS/Runner#44
For future container classes (like e.g. image set this would also need to be added, to be compatible with the memoizing implementation in the runner)