Skip to content
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

Wrap sdf::Errors with exceptions in all python bindings #1061

Merged
merged 1 commit into from
Jun 29, 2022

Conversation

azeey
Copy link
Collaborator

@azeey azeey commented Jun 28, 2022

🎉 New feature

Toward #931

Summary

This is a followup on #1004. It wraps the remaining python bound functions that return sdf::Errors and throws an exception instead.

Test it

Existing unit tests.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

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.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey added the mujoco label Jun 28, 2022
@azeey azeey requested a review from ahcorde June 28, 2022 22:23
@azeey azeey requested a review from scpeters as a code owner June 28, 2022 22:23
@azeey azeey self-assigned this Jun 28, 2022
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Jun 28, 2022
@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #1061 (ba0d878) into main (2a7b698) will decrease coverage by 0.03%.
The diff coverage is 60.97%.

@@            Coverage Diff             @@
##             main    #1061      +/-   ##
==========================================
- Coverage   83.42%   83.39%   -0.04%     
==========================================
  Files         150      151       +1     
  Lines       18468    18490      +22     
==========================================
+ Hits        15407    15419      +12     
- Misses       3061     3071      +10     
Impacted Files Coverage Δ
python/src/sdf/pyRoot.cc 55.73% <33.33%> (-9.57%) ⬇️
python/src/sdf/pyJoint.cc 65.43% <50.00%> (-2.47%) ⬇️
python/src/sdf/pyModel.cc 61.41% <66.66%> (+0.61%) ⬆️
python/src/sdf/pyJointAxis.cc 61.19% <85.71%> (+4.05%) ⬆️
python/src/sdf/pyFrame.cc 58.82% <100.00%> (-2.29%) ⬇️
python/src/sdf/pySemanticPose.cc 80.00% <100.00%> (+7.77%) ⬆️
python/src/sdf/pybind11_helpers.cc 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a7b698...ba0d878. Read the comment docs.

@azeey azeey enabled auto-merge (squash) June 29, 2022 00:18
@chapulina chapulina added the scripting Scripting interfaces to Ignition label Jun 29, 2022
@azeey azeey merged commit d3fde45 into gazebosim:main Jun 29, 2022
azeey added a commit to gazebosim/gz-mujoco that referenced this pull request Jun 29, 2022
After gazebosim/sdformat#1061, any function in libsdformat that would return an sdf::Errors now throws an exception that wraps the errors. This PR makes the necessary API changes to accommodate that.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@ahcorde ahcorde mentioned this pull request Jun 30, 2022
62 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden mujoco scripting Scripting interfaces to Ignition
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants