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

Replace rclpyHandle with type stubs #1326

Merged
merged 6 commits into from
Aug 8, 2024

Conversation

InvincibleRMC
Copy link
Contributor

Currently using rclpyHandle to mock the pybind implementation has cause some weirdness when dealing with type annotations. A better and more scalable solutions is replacing it with custom type stubs. One day in the future I would love to use stubgen to automatically generate stubs however it is still missing many features for example generics, TypeDicts, etc. Pybind has made progress in the recent years with function type annotations it however still needs work. This would also allow us to move the Various Handle Protocols into type stubs which is probably a better long term plan.

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
@InvincibleRMC InvincibleRMC changed the title Replace rclpyHandle with stubs Replace rclpyHandle with type stubs Aug 1, 2024
@sloretz
Copy link
Contributor

sloretz commented Aug 7, 2024

Pulls: #1326
Gist: https://gist.githubusercontent.com/sloretz/82e7544d7bfb17294da726ff21992977/raw/b3de9474d3262c06a2c13641f9953e346ba19198/ros2.repos
BUILD args: --packages-up-to rclpy
TEST args: --packages-select rclpy
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14379

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor

clalancette commented Aug 8, 2024

Pulls: #1326
Gist: https://gist.githubusercontent.com/clalancette/ed71384569fc5e01f7775c1876efc938/raw/b3de9474d3262c06a2c13641f9953e346ba19198/ros2.repos
BUILD args: --packages-above-and-dependencies rclpy
TEST args: --packages-above rclpy
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14386

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor

This one is going to have to be rebased onto the latest to pass CI. Sorry about that.

@sloretz
Copy link
Contributor

sloretz commented Aug 8, 2024

Pulls: #1326
Gist: https://gist.githubusercontent.com/sloretz/fa85bfa3e6f28e062dda6d0648a316a1/raw/b3de9474d3262c06a2c13641f9953e346ba19198/ros2.repos
BUILD args: --packages-up-to rclpy
TEST args: --packages-select rclpy
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14390

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@sloretz sloretz merged commit 1eb4208 into ros2:rolling Aug 8, 2024
3 checks passed
@InvincibleRMC InvincibleRMC deleted the replace-rclpyhandle-with-stubs branch September 13, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants