Repository navigation
[FIX] pyopenms copy constructors (wrapping) - #5460
Conversation
|
The main question here is if additional tests are necessary, how such a test would look like and how the test generation could be automated. Probably similar to the copy, deep copy test for MSExperiment (https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/tests/unittests/test000.py) Is it feasible to test that for every corresponding pxd? |
|
So this means that "AASequence(AASequence) nogil except +" kind of works as it uses the copy constructor but it does not generate the deep copy code? What is the rational behind that? |
I actually have no idea about the rationale and the decision when this kind of wrapping should be used instead of the one with the reference. @hroest Can you comment on that? |
|
rebuild jenkins |
Description
Inconsistency of copy constructor wrapping in pyopenms (.pxd) wrappers.
Only when using the correct wrapper format, a copy and deepcopy function will be present in pyopenms.
AASequence(AASequence &) nogil except +
Also, see the example files provided in the autowrap repository:
https://github.com/uweschmitt/autowrap/blob/master/tests/test_files/minimal.hpp#L25
https://github.com/uweschmitt/autowrap/blob/master/tests/test_files/minimal.pxd#L22
In the other cases, the methods are not introduced. I was not aware of any use-case for that matter.
AASequence(AASequence) nogil except +
AASequence(AASequence &) nogil except + # wrap-ignore
As shortly discussed with Hannes, I changed the wrappers to the respective format.
# compiler: This means that there was no user-specified constructor/copy constructor.# private/deleted: Not implemented# protected: Not available in pyopenmsI am not sure about additional testing - are all the classes tested in the unit tests?
Checklist:
How can I get additional information on failed tests during CI:
If your PR is failing you can check out
Note: