Use match to check hole2 warnings#3162
Conversation
|
536 extra errors is problematic, we need to get to the bottom of that first? I can't imagine it being healthy for users to have a wall of warnings show up? |
Codecov Report
@@ Coverage Diff @@
## master #3162 +/- ##
==========================================
+ Coverage 90.97% 91.81% +0.84%
==========================================
Files 162 167 +5
Lines 22194 22699 +505
Branches 3198 3198
==========================================
+ Hits 20190 20841 +651
- Misses 1381 1774 +393
+ Partials 623 84 -539
Continue to review full report at Codecov.
|
|
@IAlibay I think it's because we get the bonds for each atom. There's 264 atoms, and the DeprecationWarning in #3160 is raised each time we get the bonds and it's not an empty group. That'll be a pain for writing PDB files out, I guess -- although I think the default treatment of multiple warnings is to only print out the first instance. |
Yikes :( does this incur an additional performance cost? |
Incrementally more than the cost associated with getting the bonds atom-by-atom. I could probably update the writer to just call bonds once. |
orbeckst
left a comment
There was a problem hiding this comment.
I am happy with this PR; checking exactly what you're looking for than just checking numbers of warnings is better in any case.
The root cause issue of having all these additional warnings requires another issue. Let's keep things simple.
|
@IAlibay please merge when you think it's ready. |
Ok let's go with this then. We should think of a way to test how many warnings get emitted during our tests (i.e. something like codecov for warnings), that way we can tell just how much of an impact adding warnings have. |
Fixes #Tests are failing in #3160 because tests for hole2 check how many warnings are generated. This has been a pain in the past as we add and remove warnings.
Changes made in this Pull Request:
PR Checklist