buffer_protocol for vectors and matrices in python bindings#524
buffer_protocol for vectors and matrices in python bindings#524arjo129 merged 8 commits intogazebosim:mainfrom
Conversation
ahcorde
left a comment
There was a problem hiding this comment.
Do you mind to sign the commit?
Codecov Report
@@ Coverage Diff @@
## gz-math7 #524 +/- ##
=========================================
Coverage 99.70% 99.70%
=========================================
Files 77 77
Lines 7026 7026
=========================================
Hits 7005 7005
Misses 21 21
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Tests are failing because of lack of numpy. Do you prefer to add numpy to the test environment or introducing this dependency is undesirable and I should rewrite the test to do away with numpy? |
ahcorde
left a comment
There was a problem hiding this comment.
you can add the dependency here https://github.com/gazebosim/gz-math/blob/gz-math7/.github/ci/packages.apt
Done, thanks for the pointer 🙏 |
|
@ahcorde do you have additional pointers on why tests are failing? In particular, homebrew is missing numpy |
We generally don't add dependencies to stable releases. If you could, retarget this to |
Agreed. Hopefully we can backport to |
|
Cool, thanks for taking this over. Perhaps the comments could help explain a bit more what's going on/what the alternatives are? |
|
Hi @unjambonakap , was wondering what the status on this was. Do we intend shipping this change with ionic (code freeze 26/8)? If we can't come to a consensus by then I will remove the beta label. For starters would it be possible for you to resolve the merge conflicts. |
4f123b2 to
462b040
Compare
|
Also as this PR breaks API can we plese target |
Also IndexError is raised on invalid vector __getitem__/__setitem__ access. This way list(vector) works correctly instead of spinning Signed-off-by: Benoit Maurin <maurinbe@gmail.com>
Signed-off-by: Benoit Maurin <maurinbe@gmail.com>
- make Data() method comment clearer as per suggestion - tests will succeed if numpy dependency is not available Signed-off-by: Benoit Maurin <maurinbe@gmail.com>
Signed-off-by: Benoit Maurin <maurinbe@gmail.com>
Signed-off-by: Benoit Maurin <maurinbe@gmail.com>
arjo129
left a comment
There was a problem hiding this comment.
Thanks for these changes. I tested them and they mostly look good to me. There are some minor stylistic improvements that need to be made before I finally ✔️ them.
|
@unjambonakap any chance you can respond to the feedback in the next couple days? Since gz-math is a lower level library in the Gazebo stack, we'd like to wrap up PRs earlier to make sure there is enough time to test them before the code freeze (August 28th). |
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
|
By Monday I should get it done
…On Thu, Aug 22, 2024, 6:13 PM Addisu Z. Taddese ***@***.***> wrote:
@unjambonakap <https://github.com/unjambonakap> any chance you can
respond to the feedback in the next couple days? Since gz-math is a lower
level library in the Gazebo stack, we'd like to wrap up PRs earlier to make
sure there is enough time to test them before the code freeze (August 28th).
—
Reply to this email directly, view it on GitHub
<#524 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6XYYD54UMW37YDE7L62I3ZSYE3LAVCNFSM6AAAAABMFTYQRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVGE2DSMJVHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
F. Sorry about that I was afk
Thanks for doing it
…On Fri, Aug 23, 2024, 10:55 PM Benoit Maurin ***@***.***> wrote:
By Monday I should get it done
On Thu, Aug 22, 2024, 6:13 PM Addisu Z. Taddese ***@***.***>
wrote:
> @unjambonakap <https://github.com/unjambonakap> any chance you can
> respond to the feedback in the next couple days? Since gz-math is a lower
> level library in the Gazebo stack, we'd like to wrap up PRs earlier to make
> sure there is enough time to test them before the code freeze (August 28th).
>
> —
> Reply to this email directly, view it on GitHub
> <#524 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AA6XYYD54UMW37YDE7L62I3ZSYE3LAVCNFSM6AAAAABMFTYQRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVGE2DSMJVHE>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
|
I didn't address some of the feedback. Mainly, I think it would be good to add c++ tests. |
Signed-off-by: Benoit Maurin <maurinbe@gmail.com>
arjo129
left a comment
There was a problem hiding this comment.
Thanks for iterating on this. LGTM.
In the interest of time, lets get this merged. @unjambonakap has already addressed the said issues.
This is an extension/takeover of #498
Summary
This change enables the buffer_protocol for
VectorXandMatrixYxYso thatmemoryiewandnumpy.arraycan be used on themAdditionally:
Checklist
codecheckpassed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-bymessages.