-
Notifications
You must be signed in to change notification settings - Fork 98
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
Port embedSdf script from Ruby to Python3 and provide unittests #884
Conversation
@osrf-jenkins run tests please |
2fb48f1
to
df97b05
Compare
625bc4d
to
934cac5
Compare
55a990a
to
0862e66
Compare
Codecov Report
@@ Coverage Diff @@
## main #884 +/- ##
==========================================
+ Coverage 87.20% 87.21% +0.01%
==========================================
Files 124 124
Lines 16229 16229
==========================================
+ Hits 14152 14154 +2
+ Misses 2077 2075 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
I left a few minor comments, but overall, this looks great! Thank you for your
contribution!
embedSdf.rb
has since been updated to include a new SDF version (1.10). Do
you mind updating the python code to reflect that?
939219a
to
7395479
Compare
7395479
to
e8f56ba
Compare
I fixed the merge conflict that was due to the |
this uses internal functions from GoogleTests to capture the stderr message but according to the documentation it should be fine to use them: // All macros ending with _ and symbols defined in an // internal namespace are subject to change without notice. Code // outside Google Test MUST NOT USE THEM DIRECTLY. Macros that don't // end with _ are part of Google Test's public API and can be used by // code outside Google Test. see https://github.com/google/googletest/blob/main/googletest/include/gtest/internal/gtest-port.h Signed-off-by: Bi0T1N <[email protected]>
- removes Ruby dependency (see gazebosim#274) - improvements for cpplint checks (e.g. copyright header) Signed-off-by: Bi0T1N <[email protected]>
it should not be operating system dependent because it is hardcoded to '/' in the C++ file that performs the lookup Signed-off-by: Bi0T1N <[email protected]>
Signed-off-by: Bi0T1N <[email protected]>
This reverts commit 2322458. Signed-off-by: Bi0T1N <[email protected]>
it's the same approach as in parser_TEST.cc Signed-off-by: Bi0T1N <[email protected]>
Signed-off-by: Bi0T1N <[email protected]>
Signed-off-by: Bi0T1N <[email protected]>
Signed-off-by: Bi0T1N <[email protected]>
Signed-off-by: Bi0T1N <[email protected]>
Signed-off-by: Bi0T1N <[email protected]>
Signed-off-by: Bi0T1N <[email protected]>
Signed-off-by: Bi0T1N <[email protected]>
e16e985
to
bbe6714
Compare
Apparently I misinterpreted the comments and made the changes to the wrong project. Anyway, rebased my changes on main and added Python interpreter as a build dependency with |
@scpeters any remaining issues? |
Converts the script that creates the .cc file for mapping of SDF filename and SDF content from Ruby to Python. Additionally a few unittests are added for the function that uses the mapping and which wasn't tested before. Signed-off-by: Bi0T1N <[email protected]> Co-authored-by: Bi0T1N <[email protected]> Co-authored-by: Michael Carroll <[email protected]>
These won't be used as part of the cmake build on this branch, but are useful for generating the same file from bazel. Co-authored-by: Bi0T1N <[email protected]> Co-authored-by: Michael Carroll <[email protected]> Signed-off-by: Michael Carroll <[email protected]>
* Cherry-pick the python3 embedSdf script and tests (#884) These won't be used as part of the cmake build on this branch, but are useful for generating the same file from bazel. Co-authored-by: Bi0T1N <[email protected]> Co-authored-by: Michael Carroll <[email protected]> Signed-off-by: Michael Carroll <[email protected]> * Improvements to embedSdf script Signed-off-by: Michael Carroll <[email protected]> * Update sdf/CMakeLists.txt Signed-off-by: Michael Carroll <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]> * Update bazel files Signed-off-by: Michael Carroll <[email protected]> * Lint Signed-off-by: Michael Carroll <[email protected]> * Add utils back to parser Signed-off-by: Michael Carroll <[email protected]> * Fix gz_TEST Signed-off-by: Michael Carroll <[email protected]> * Ignore pycache folders Signed-off-by: Michael Carroll <[email protected]> * Fix parser_TEST Signed-off-by: Michael Carroll <[email protected]> * Bazel nits Signed-off-by: Michael Carroll <[email protected]> * Fix path logic Signed-off-by: Michael Carroll <[email protected]> * Fix visibility Signed-off-by: Michael Carroll <[email protected]> * Fix strings Signed-off-by: Michael Carroll <[email protected]> * Use standard vars Signed-off-by: Michael Carroll <[email protected]> * Fix string conversions Signed-off-by: Michael Carroll <[email protected]> * Fix string conversions Signed-off-by: Michael Carroll <[email protected]> * Fix embedded sdf Signed-off-by: Michael Carroll <[email protected]> * Fix converter test Signed-off-by: Michael Carroll <[email protected]> * Lint Signed-off-by: Michael Carroll <[email protected]> * Update bazel files Signed-off-by: Michael Carroll <[email protected]> * Add detail prefix Signed-off-by: Michael Carroll <[email protected]> * Fix test path Signed-off-by: Michael Carroll <[email protected]> * Set homepath on Windows Signed-off-by: Michael Carroll <[email protected]> --------- Signed-off-by: Michael Carroll <[email protected]> Signed-off-by: Michael Carroll <[email protected]> Co-authored-by: Bi0T1N <[email protected]> Co-authored-by: Bi0T1N <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]>
🎉 New feature
Removes the Ruby dependency and thus is related to/partially solves #274 (for complete Ruby dependency removal #643 should be merged as well).
Summary
This PR converts the script that creates the
.cc
file for mapping of SDF filename and SDF content from Ruby to Python. Additionally a few unittests are added for the function that uses the mapping and which wasn't tested before.For details see also the commit messages.
Note: Since I wasn't sure if this change counts as an API/ABI change or not, I targeted it to main.
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.