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

Added Plugin Python interface #997

Merged
merged 15 commits into from
Jun 1, 2022
Merged

Added Plugin Python interface #997

merged 15 commits into from
Jun 1, 2022

Conversation

ahcorde
Copy link
Collaborator

@ahcorde ahcorde commented Apr 21, 2022

Signed-off-by: ahcorde [email protected]

🎉 New feature

This PR is part of this meta ticket #931

Summary

Added Plugin Python interface

Test it

from sdformat import Plugin

plugin = Plugin()

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • 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.

@ahcorde ahcorde added scripting Scripting interfaces to Ignition mujoco labels Apr 21, 2022
@ahcorde ahcorde requested review from azeey and scpeters as code owners April 21, 2022 09:38
@ahcorde ahcorde self-assigned this Apr 21, 2022
@ahcorde ahcorde mentioned this pull request Apr 21, 2022
62 tasks
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Apr 21, 2022
@ahcorde ahcorde mentioned this pull request Apr 21, 2022
8 tasks
@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #997 (069e83f) into main (293a977) will not change coverage.
The diff coverage is n/a.

❗ Current head 069e83f differs from pull request most recent head 48698b0. Consider uploading reports for the commit 48698b0 to get more accurate results

@@           Coverage Diff           @@
##             main     #997   +/-   ##
=======================================
  Coverage   66.66%   66.66%           
=======================================
  Files           2        2           
  Lines          27       27           
=======================================
  Hits           18       18           
  Misses          9        9           

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 293a977...48698b0. Read the comment docs.

Copy link
Collaborator

@azeey azeey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few minor comments.

python/src/sdf/pyPlugin.cc Show resolved Hide resolved
python/src/sdf/pyPlugin.cc Outdated Show resolved Hide resolved
python/test/pyPlugin_TEST.py Outdated Show resolved Hide resolved
python/test/pyPlugin_TEST.py Outdated Show resolved Hide resolved
@ahcorde ahcorde requested a review from azeey May 30, 2022 10:44
Copy link
Collaborator

@azeey azeey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except the changes merged from another PR.

/// \param[out] _worldName The name of the world
/// \return Errors, which is a vector of Error objects. Each Error includes
/// an error code and message. An empty vector indicates no error.
public: Errors WorldName(const std::string &_filename,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is from a different PR :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/Root.cc Outdated
@@ -140,6 +140,40 @@ Root::Root()
{
}

Errors Root::WorldName(const std::string &_filename, std::string &_worldName)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/Root_TEST.cc Outdated
@@ -65,6 +66,24 @@ TEST(DOMRoot, MoveAssignmentOperator)
EXPECT_EQ("test_root", root2.Version());
}

TEST(DOMRoot, WorldName)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: ahcorde <[email protected]>
@ahcorde ahcorde merged commit 999a1a0 into main Jun 1, 2022
@ahcorde ahcorde deleted the ahcorde/python/plugin branch June 1, 2022 08:26
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants