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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Added basic structure #932

Merged
merged 6 commits into from
Apr 5, 2022
Merged

Conversation

ahcorde
Copy link
Collaborator

@ahcorde ahcorde commented Apr 4, 2022

馃帀 New feature

This PR is part of this mete ticket #931

Summary

This PR add the basic structure to create Python binding using pybind11

Test it

Compile the code, export the pythonpath and run the example

export PYTHONPATH=$PYTHONPATH:<path to ws>/install/lib/python
python3 examples/python/python_sdformat.py

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 the mujoco label Apr 4, 2022
@ahcorde ahcorde self-assigned this Apr 4, 2022
@ahcorde ahcorde mentioned this pull request Apr 4, 2022
62 tasks
@osrf-triage osrf-triage added this to Inbox in Core development Apr 4, 2022
@github-actions github-actions bot added the 馃尡 garden Ignition Garden label Apr 4, 2022
Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde force-pushed the ahcorde/python/basic_structure branch from 4e7cf29 to 25cc8a5 Compare April 4, 2022 09:52
Signed-off-by: ahcorde <ahcorde@gmail.com>
@chapulina chapulina moved this from Inbox to In review in Core development Apr 4, 2022
@chapulina chapulina added the scripting Scripting interfaces to Ignition label Apr 4, 2022
Signed-off-by: ahcorde <ahcorde@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Apr 4, 2022

Codecov Report

Merging #932 (2db0690) into main (6e7336c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #932   +/-   ##
=======================================
  Coverage   88.16%   88.16%           
=======================================
  Files         100      100           
  Lines       14637    14637           
=======================================
  Hits        12905    12905           
  Misses       1732     1732           

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 6e7336c...2db0690. Read the comment docs.

CMakeLists.txt Outdated
"Use dist-packages instead of site-package to install python modules"
OFF)

include(IgnPython)
Copy link
Member

Choose a reason for hiding this comment

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

there is already some code to find python up at lines 60-90; we should unify that code with this

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 <ahcorde@gmail.com>
@ahcorde ahcorde requested a review from scpeters April 5, 2022 15:29
CMakeLists.txt Show resolved Hide resolved
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.

Should we set the cmake_minimum_required version to 3.12 since main is
targetting focal and later? This will ensure that we're using find_package(Python3) in ign-cmake.

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
python/CMakeLists.txt Outdated Show resolved Hide resolved
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde requested a review from azeey April 5, 2022 19:54
@ahcorde ahcorde merged commit 266d452 into main Apr 5, 2022
Core development automation moved this from In review to Done Apr 5, 2022
@ahcorde ahcorde deleted the ahcorde/python/basic_structure branch April 5, 2022 20:34
@chapulina chapulina moved this from Done to Highlights in Core development Apr 6, 2022
@j-rivero j-rivero removed this from Highlights in Core development May 6, 2022
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.

None yet

5 participants