-
Notifications
You must be signed in to change notification settings - Fork 8
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
Remove unnecessary calls to minimal_callsafe_copy
#333
Conversation
docstring fix
test fix
6e4d941
to
cf62d4f
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #333 +/- ##
==========================================
- Coverage 92.48% 92.26% -0.23%
==========================================
Files 41 41
Lines 7135 7172 +37
==========================================
+ Hits 6599 6617 +18
- Misses 536 555 +19 ☔ View full report in Codecov by Sentry. |
In fact, do we ever need to do The basic guarantees that we want from minimal_callsafe_copy is that if The need for It is clear from the above that any type that does not support This doesn't mean |
minimal_callsafe_copy
minimal_callsafe_copy
The calls to minimal_callsafe_copy everywhere are too conservative. The semantics of this function is the following
Therefore there is no need to do such copies for GreenSolutions and GreenSlicers, since they cannot be
call!
ed.This PR, built out of #332 , is an experiment to see if such a cleanup breaks tests
(EDIT) Summary:
Quantica.minimal_callsafe_copy
must be understood as a partner toQuantica.call!
. It need not exist on objects that cannot be changed by aQuantica.call!
. But it is convenient to have otherwise for advanced users, even if we don't actually use all its methods in Quantica.