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 Atmosphere Python interface #968

Merged
merged 10 commits into from
May 12, 2022
Merged

Added Atmosphere Python interface #968

merged 10 commits into from
May 12, 2022

Conversation

ahcorde
Copy link
Collaborator

@ahcorde ahcorde commented Apr 12, 2022

Signed-off-by: ahcorde [email protected]

🎉 New feature

This PR is part of this mete ticket #931

Summary

Added Atmosphere Python interface

Test it

from sdformat import Atmosphere

Atmosphere = Atmosphere()

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.

Signed-off-by: Alejandro Hernández <[email protected]>
@ahcorde ahcorde added the scripting Scripting interfaces to Ignition label Apr 12, 2022
@ahcorde ahcorde requested review from azeey and scpeters as code owners April 12, 2022 11:14
@ahcorde ahcorde self-assigned this Apr 12, 2022
@ahcorde ahcorde mentioned this pull request Apr 12, 2022
62 tasks
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Apr 12, 2022
Signed-off-by: Alejandro Hernández <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2022

Codecov Report

Merging #968 (05a240a) into main (bb84733) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #968   +/-   ##
=======================================
  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 bb84733...05a240a. Read the comment docs.

include/sdf/Atmosphere.hh Show resolved Hide resolved
python/src/sdf/pyAtmosphere.cc Outdated Show resolved Hide resolved
return sdf::Atmosphere(self);
}, "memo"_a);

pybind11::enum_<sdf::AtmosphereType>(geometryModule, "AtmosphereType")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be in the sdformat namespace?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you should access this enum:

Atmosphere.AtmosphereType.ADIABATIC

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right, but that is different from the C++ equivalent sdf::AtmosphereType where it's directly under sdf, not sdf::Atmosphere::AtmosphereType. I'm just asking if we should try to closely match the C++ API or not.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for now, I'm using this way with all the python bindings, we can make a decision at the end and change all of them at once.

@ahcorde ahcorde requested a review from azeey April 18, 2022 08:19
@ahcorde ahcorde mentioned this pull request Apr 18, 2022
8 tasks
@azeey azeey mentioned this pull request Apr 21, 2022
8 tasks
@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #968 (3757129) into main (7182fad) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #968   +/-   ##
=======================================
  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 7182fad...3757129. Read the comment docs.

@ahcorde ahcorde merged commit 324a755 into main May 12, 2022
@ahcorde ahcorde deleted the ahcorde/python/atmosphere branch May 12, 2022 07:34
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.

4 participants