-
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
Make composites scoped #151
Make composites scoped #151
Conversation
Adding |
Way overkill IMO. They publicly inherit, so it suffices to just document on the base class. |
a02f5ba
to
4761a9f
Compare
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.
Will you be adding the close()
method to the docs?
Ok, I removed the TBH, I liked having those specific examples that remind users they should use the new context manager form, but I trust our docs team will illustrate this nicer in a shared/common place. |
I wasn't planning to. We don't have it on dwave-system composites either. Nor we have |
4761a9f
to
56599c8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #151 +/- ##
==========================================
+ Coverage 98.50% 98.53% +0.03%
==========================================
Files 19 20 +1
Lines 1002 1026 +24
==========================================
+ Hits 987 1011 +24
Misses 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Deleted my previous comments, my misunderstanding, sorry
Actually I'm now thinking that the composites do the context management for the user, right? So my previous comments are likely wrong. |
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.
Code seems good! I feel ambivalent about the doc changes.
They don't magically wrap children in runtime contexts, if that's what you mean. Users still need to use these composites as context managers in order to trigger close on resources wrapped. Examples in the deleted commit. |
Co-authored-by: Joel Pasvolsky <[email protected]>
Also, close #150.