-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add python bindings for sdf::Element
and sdf::Param
#1303
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1303 +/- ##
==========================================
- Coverage 87.64% 87.35% -0.30%
==========================================
Files 128 133 +5
Lines 16837 17133 +296
==========================================
+ Hits 14757 14966 +209
- Misses 2080 2167 +87
|
python/src/sdf/pyElement.cc
Outdated
// get_attributes | ||
// get_attribute (index) | ||
// get_element_description_count | ||
// get_element_description (index) | ||
// get_element_description (string) | ||
// has_element_description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these TODOs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I've implemented some of them. The rest, I have commented why I didn't think we need to implement them.
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
8f6b894
to
784fca9
Compare
I've retargeted this to |
sdf::Element
sdf::Element
and sdf::Param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, left couple of comments.
.def("clone", ErrorWrappedCast<>(&Element::Clone, py::const_), | ||
"Create a copy of this Element.") | ||
.def("copy", ErrorWrappedCast<ElementPtr>(&Element::Copy), | ||
"Copy values from an Element.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here, is this wrapper enough for both implementations of the methods?
Signed-off-by: Addisu Z. Taddese <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🎉 New feature
Addition to #931
Summary
My intention was to add just
sdf::Element
, butsdf::Param
was needed for many of the useful APIs. Similarly,PrintConfig
was also added here.Test it
ctest -R pyElement
ctest -R pyParam
ctest -R pyPrintConfig
Checklist
codecheck
passed (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-by
messages.