Repository navigation
Replace C-extension with pure Python code for QCP superimposition. - #3876
Conversation
|
Crazy implementation 😉 |
Codecov Report
@@ Coverage Diff @@
## master #3876 +/- ##
==========================================
- Coverage 84.31% 78.76% -5.55%
==========================================
Files 322 303 -19
Lines 55095 52176 -2919
==========================================
- Hits 46452 41098 -5354
- Misses 8643 11078 +2435
Continue to review full report at Codecov.
|
|
@peterjc any idea on why the tests would be failing with the import errors? Locally they all pass (on MacOS and Windows). |
|
e.g.
I have no idea, @mdehoon may be able to tell? There is nothing obviously changed on the C side in this PR that I can see. |
|
Thanks. This is also happening on master, the latest commit is also failing with this message. The weird thing is that it seems to run fine on Linux, so maybe it's a CI configuration thing with MacOS and Windows? The tests started failing after this commit b67c382, which is weird because it also didn't touch the C code. |
|
I can reproduce this locally with |
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.)
This PR replaces the QCPSuperimposer C module with a pure Python implementation, with minimal loss of performance. In fact, it improves performance in my tests by ~30%. The API is largely the same, with the addition of
set_atomsandapply, to mirror the behavior ofSuperimposerand simplify access to the algorithm. Also refactored the tests to useassertEqualinstead of multiple calls tonumpy.array_equal, which were making debugging failing tests quite difficult.