Repository navigation
fixes formatting for extremely high B-factor values - #5047
Conversation
JoaoRodrigues
left a comment
There was a problem hiding this comment.
Thanks for catching this, see my comment.
If possible, could you also add a unit test covering this scenario? You can modify one of the files we already have in the test suite, just add a couple of large b-factors and see if the file is written correctly.
|
Will do on Monday. I'm away from civilisation this weekend. I'll be up a mountain. |
Thanks and enjoy! |
|
I have added unit tests, and restructured how the formatting works a little bit. Since technically the maximum value for a bfactor can be 999_999 (if we have no decimals) we can now handle those without emitting a warning. I also have accounted for the case where rounding increases the number of digits. Finally, I added a new warning class |
JoaoRodrigues
left a comment
There was a problem hiding this comment.
Minor comments, but looks good to me. If you can, add a small snippet to NEWS.rst explaining this change, as this can surprise some people.
|
Thanks a lot @OWissett, super nice contribution. I've enabled the full CI workflow to run on these changes and once the tests/checks pass, happy to merge. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5047 +/- ##
==========================================
+ Coverage 85.45% 86.32% +0.87%
==========================================
Files 286 286
Lines 59854 59874 +20
==========================================
+ Hits 51147 51686 +539
+ Misses 8707 8188 -519 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Merged, thanks again @OWissett ! |
I hereby agree to dual licence this and any previous contributions under both
the Biopython License Agreement AND the BSD 3-Clause License.
I have read the
CONTRIBUTING.rstfile, have runpre-commitlocally, and understand that continuous integration checks will be used to
confirm the Biopython unit tests and style checks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rstandCONTRIB.rstas part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)
Closes #5046