-
Notifications
You must be signed in to change notification settings - Fork 26
Deprecate ensure #583
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
Deprecate ensure #583
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #583 +/- ##
========================================
Coverage 86.47% 86.48%
========================================
Files 108 108
Lines 8283 8271 -12
========================================
- Hits 7163 7153 -10
+ Misses 1120 1118 -2
Continue to review full report at Codecov.
|
chris-langfield
left a comment
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.
Looked through for any mishaps your script might have made but found none. Also did an extra git grep to make sure we got all of them. Thanks!
janden
left a comment
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.
Thanks.
Just out of curiosity, I suppose this
assert statements in Python are sometimes optimized away by the compiler, and are for internal testing purposes.
For user-facing assertions, we use this simple wrapper to ensure conditions are met at relevant parts of the code.
is in fact not the case?
Well it is half true, so that is a fair question. Not true for this project. Technically asserts can be optimized away, but only if we optimize or a user intentionally optimizes our code with special flags before attempting to use it. This isn't something we do. It is akin to disabling logging/warnings via command line flags. Another, seperate discussion... If there is an assert that is not for sanity check purposes, testing, or debugging, it should be converted to raise an exception. |
|
Ok thanks! |
Closes #578