ros2_control icon indicating copy to clipboard operation
ros2_control copied to clipboard

Add tests for launch_utils of controller manager (#2147)

Open robkwan opened this issue 4 months ago • 7 comments

Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

  1. Limited scope. Your PR should do one thing or one set of things. Avoid adding “random fixes” to PRs. Put those on separate PRs.
  2. Give your PR a descriptive title. Add a short summary, if required.
  3. Make sure the pipeline is green.
  4. Don’t be afraid to request reviews from maintainers.
  5. New code = new tests. If you are adding new functionality, always make sure to add some tests exercising the code and serving as live documentation of your original intention.

To send us a pull request, please:

  • [ ] Fork the repository.
  • [ ] Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
  • [ ] Ensure local tests pass. (colcon test and pre-commit run (requires you to install pre-commit by pip3 install pre-commit)
  • [ ] Commit to your fork using clear commit messages.
  • [ ] Send a pull request, answering any default questions in the pull request interface.
  • [ ] Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

robkwan avatar Nov 02 '25 07:11 robkwan

Codecov Report

:x: Patch coverage is 88.23529% with 4 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 89.65%. Comparing base (a7e0b3a) to head (05e3d32).

Files with missing lines Patch % Lines
...ller_manager/test/test_ros2_control_node_launch.py 88.23% 2 Missing and 2 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2768      +/-   ##
==========================================
+ Coverage   89.62%   89.65%   +0.03%     
==========================================
  Files         152      152              
  Lines       17637    17670      +33     
  Branches     1448     1451       +3     
==========================================
+ Hits        15807    15842      +35     
+ Misses       1246     1241       -5     
- Partials      584      587       +3     
Flag Coverage Δ
unittests 89.65% <88.23%> (+0.03%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ller_manager/test/test_ros2_control_node_launch.py 94.66% <88.23%> (-5.34%) :arrow_down:

... and 2 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Nov 02 '25 12:11 codecov[bot]

Thanks for the comment, @christophfroehlich! Let me try again then...

robkwan avatar Nov 03 '25 06:11 robkwan

Hi @christophfroehlich, I hope that it will work ok this time please. I first did the pre-commit ok in my jazzy branch but once I merged back to the master branch, I forgot to redo the pre-commit and so I had another commit to fix that again! Thanks!

robkwan avatar Nov 09 '25 19:11 robkwan

Hi @christophfroehlich, thanks for the feedback. And I just tried to make the changes and committed again [ef44894]. Hope that it will be ok this time. By the way, I will be out of town from next weekend and so I won't be able to work on it till I am back early next year. So I hope that I can help to close this before I depart then. Thanks!

robkwan avatar Nov 16 '25 02:11 robkwan

Hi @christophfroehlich, after changing to use the PathSubstitution approach, I found that there're more changes involved or it would fail for the difference between path and string as I could see from the colcon test-result --verbose. Therefore, I hope that it is ok this time. If more change is needed and it is not urgent, I can resume after I come back from my trip in early Jan. Thanks.

robkwan avatar Nov 21 '25 10:11 robkwan

This pull request is in conflict. Could you fix it @robkwan?

mergify[bot] avatar Nov 23 '25 18:11 mergify[bot]

Hi @christophfroehlich , thanks for the comment! I will try to do as suggested after I will be back home after new year then...Thanks.

robkwan avatar Nov 24 '25 23:11 robkwan