-
Notifications
You must be signed in to change notification settings - Fork 439
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
Add stubs to python bindings to provide typing information. #2415
base: main
Are you sure you want to change the base?
Conversation
181e7cd
to
060dde3
Compare
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.
Please see slack thread here
060dde3
to
4442d23
Compare
4442d23
to
b14371c
Compare
b14371c
to
1a5aa70
Compare
1a5aa70
to
b21a32d
Compare
5504972
to
c70299f
Compare
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.
LGTM. Excited to have this, thanks!
Eventually it would be good to separate the binding process so that all the enums and classes are instantiated in appropriate order and then all their method bindings are added. This will address circular refs between class methods, where each class has a method argument referencing the other class. |
That I'm (partially) handling in the m.css stub output already (#2477) -- there it's the types first and functions after. Doesn't handle type dependencies yet but internally it has knowledge about their dependencies so it could attempt to either sort them or make "forward declarations" when dependencies are cyclic (i.e., stringified annotations). |
Motivation and Context
This changeset adds stubs to python bindings to provide typing information.
Stub generation depends on
pybind11-stubgen
.typing-2024-06-16_22.01.01.mp4
How to test:
pip install pybind11-stubgen
.habitat-sim
normally.WIP:
How Has This Been Tested
Tested by importing
habitat_sim
in an external Python file.Types of changes
Checklist