-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
pydrake has C++ class names in the documentation #17520
Comments
Discussed in slack thread. The problem stems from an incorrect execution while loading our pydrake native definitions. That can happen either because we're missing In the simple case of missing imports, @mwoehlke-kitware and/or myself will probably just add the imports ourselves. The example above of As we find further specific instances of cycles, we'll figure out some way to loop in the feature area owners to help decide how to break the cycles. |
Add pybind11-stubgen as a new external. Add a rule to generate `.pyi`s for `pydrake` using the same using a small helper script. For now, this must be manually invoked, and some functions are being skipped (see RobotLocomotion#17520). However, this will give us the ability to manually test the generated `.pyi` files. Adding logic to install them and/or otherwise bundle them can come latr.
Add pybind11-stubgen as a new external. Add a rule to generate `.pyi`s for `pydrake` using the same and a small helper script. For now, this must be manually invoked, and some functions are being skipped (see RobotLocomotion#17520). However, this will give us the ability to manually test the generated `.pyi` files. Adding logic to install them and/or otherwise bundle them can come later.
Add pybind11-stubgen as a new external. Add a rule to generate `.pyi`s for `pydrake` using the same and a small helper script. For now, this must be manually invoked, and some functions are being skipped (see RobotLocomotion#17520). However, this will give us the ability to manually test the generated `.pyi` files. Adding logic to install them and/or otherwise bundle them can come later.
Also, once #17521 lands, generating the |
Add mypy (and dependency typing-extensions) as new externals. Add a rule to generate `.pyi`s for `pydrake` using the same and a tiny wrapping helper script. For now, this must be manually invoked, and some functions are being skipped (see RobotLocomotion#17520). However, this will give us the ability to manually test the generated `.pyi` files. Adding logic to install them and/or otherwise bundle them can come later.
Add mypy (and dependencies) as new externals. Add a rule to generate `.pyi`s for `pydrake` using the same and a tiny wrapping helper script. For now, this must be manually invoked, and some functions have degraded type information (see RobotLocomotion#17520). However, this will give us the ability to manually test the generated `.pyi` files. Adding logic to install them and/or otherwise bundle them can come later.
Add mypy (and dependencies) as new externals. Add a rule to generate `.pyi`s for `pydrake` using the same and a tiny wrapping helper script. For now, this must be manually invoked, and some functions have degraded type information (see RobotLocomotion#17520). However, this will give us the ability to manually test the generated `.pyi` files. Adding logic to install them and/or otherwise bundle them can come later.
Add mypy (and dependencies) as new externals. Add a rule to generate `.pyi`s for `pydrake` using the same and a tiny wrapping helper script. For now, this must be manually invoked, and some functions have degraded type information (see RobotLocomotion#17520). However, this will give us the ability to manually test the generated `.pyi` files. Adding logic to install them and/or otherwise bundle them can come later.
Add mypy (and dependencies) as new externals. Add a rule to generate `.pyi`s for `pydrake` using the same and a tiny wrapping helper script. For now, this must be manually invoked, and some functions have degraded type information (see RobotLocomotion#17520). However, this will give us the ability to manually test the generated `.pyi` files. Adding logic to install them and/or otherwise bundle them can come later.
Add mypy (and dependencies) as new externals. Add a rule to generate `.pyi`s for `pydrake` using the same and a tiny wrapping helper script. For now, this must be manually invoked, and some functions have degraded type information (see RobotLocomotion#17520). However, this will give us the ability to manually test the generated `.pyi` files. Adding logic to install them and/or otherwise bundle them can come later.
Add mypy (and dependencies) as new externals. Add a rule to generate `.pyi`s for `pydrake` using the same and a tiny wrapping helper script. For now, this must be manually invoked, and some functions have degraded type information (see #17520). However, this will give us the ability to manually test the generated `.pyi` files. Adding logic to install them and/or otherwise bundle them can come later.
In #18674, I have a patch that removes any C++ types from the What remains here is to fix the documentation so that it doesn't have C++ class names in API signatures. Do to that, we need to define our bindings in a dependency-topological order, so that anything used as an argument or return type is already bound (and imported!) prior to defining more bindings. |
The next step is #20491. After that, we can return here to work on loading / definition order. |
Actually, doing #20491 without CI checking for docstring / mypy regressions is too dangerous. We need to make progress on this issue (and add regression tests) before all other pydrake refactoring. |
My WIP branch is here. I'm carving out the simpler parts into a PR train. Some of the harder parts might need to wait until pydrake re-modularization happens first. The goal for now is to get a regression test onto master relatively quickly, even if that means it has an allow-list of known bugs -- at least then we won't make things too much worse. |
Several bindings have C++ class names in their signatures, e.g. in
pydrake.geometry.AddContactMaterial
.Besides that we'd rather have the correct Python type names in the documentation, this may be an issue for IDE completion (n.b. #16987), at least if using pybind11-stubgen to generate the
.pyi
s.The text was updated successfully, but these errors were encountered: