Skip to content

Docstring specifying proper destruction and creation of Rate, Timer and GuardCondition#1286

Merged
sloretz merged 8 commits intoros2:rollingfrom
2lian:rolling
Jun 14, 2024
Merged

Docstring specifying proper destruction and creation of Rate, Timer and GuardCondition#1286
sloretz merged 8 commits intoros2:rollingfrom
2lian:rolling

Conversation

@2lian
Copy link
Contributor

@2lian 2lian commented May 18, 2024

This commit stems from my issue and discussion here

I added explanation of how the user should handle the destruction and creation of the object in the docstrings of the:

  • constructor of Rate, Timer and GuardCondition
  • .destroy methods of Rate, Timer and GuardCondition
  • .create_rate and .create_guard_condition methods of Node

Subscriber, Publisher and other objects share the same destruction process. However they already had proper warnings in their docstrings. So no changes were required for those. I have kept my new docstring consistent with those.

I have decided to only change .create_rate and .create_guard_condition methods of Node because, those are the most likely objects to be destroyed and had a very short docstrings. Adding the warning in the already long create_publisher, etc, did not seem right.

@2lian
Copy link
Contributor Author

2lian commented May 18, 2024

I wonder if I should also add this to Iron and humble branch?

2lian added 3 commits May 18, 2024 13:11
Signed-off-by: elian-WSL22H <elian.neppel@posteo.eu>
Signed-off-by: elian-WSL22H <elian.neppel@posteo.eu>
Signed-off-by: elian-WSL22H <elian.neppel@posteo.eu>
Signed-off-by: elian-WSL22H <elian.neppel@posteo.eu>
Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

lgtm with indent fixes.

2lian and others added 2 commits May 21, 2024 11:07
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Elian NEPPEL <70491689+hubble14567@users.noreply.github.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Elian NEPPEL <70491689+hubble14567@users.noreply.github.com>
@2lian
Copy link
Contributor Author

2lian commented May 21, 2024

lgtm, indeed better this way.

This reverts commit fd61446.

Signed-off-by: elian-WSL22H <elian.neppel@posteo.eu>
This reverts commit 0fb83ca.

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: elian-WSL22H <elian.neppel@posteo.eu>
@2lian
Copy link
Contributor Author

2lian commented May 21, 2024

Ok I don't know why the tests failed on fd61446, anyway they passed.

Copy link
Contributor

@sloretz sloretz left a comment

Choose a reason for hiding this comment

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

Thank you for the docstring improvements!

@sloretz
Copy link
Contributor

sloretz commented Jun 14, 2024

CI (repos file build: --packages-up-to rclpy test: --packages-select rclpy)

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

@sloretz sloretz merged commit 0926b34 into ros2:rolling Jun 14, 2024
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