Skip to content

Add pytest in automatic parking package#73

Merged
robotpilot merged 3 commits intomainfrom
feature-buildfarm-error-fix
Jun 20, 2025
Merged

Add pytest in automatic parking package#73
robotpilot merged 3 commits intomainfrom
feature-buildfarm-error-fix

Conversation

@GyuH13
Copy link
Copy Markdown
Member

@GyuH13 GyuH13 commented Jun 20, 2025

No description provided.

GyuH13 added 2 commits June 20, 2025 15:52
Signed-off-by: Hyungyu Kim <kimhg@robotis.com>
Copilot AI review requested due to automatic review settings June 20, 2025 06:57
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @GyuH13, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces pytest as the designated testing framework for the turtlebot3_automatic_parking package. By declaring pytest as a test dependency in the setup.py file, it streamlines the process for developers to set up and execute tests, ensuring better code quality and maintainability for the automatic parking functionalities.

Highlights

  • Testing Framework Integration: Integrated pytest as a test dependency for the turtlebot3_automatic_parking package by adding it to the tests_require section in setup.py.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds pytest as a test dependency for the automatic parking package.

  • Added pytest to the test requirements in setup.py.

'Examples of Different TurtleBot3 Usage.'
),
license='Apache License, Version 2.0',
tests_require=['pytest'],
Copy link

Copilot AI Jun 20, 2025

Choose a reason for hiding this comment

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

Consider using extras_require (e.g., extras_require={'test': ['pytest']}) instead of tests_require to align with current best practices for dependency management.

Suggested change
tests_require=['pytest'],
extras_require={
'test': ['pytest'],
},

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds pytest to the tests_require list in setup.py. This is a good first step for integrating pytest into the package.

My main feedback, detailed in the comment on setup.py, is to also declare pytest as a <test_depend> in the package.xml file. This is essential for compatibility with ROS 2 build and test tools like colcon.

Additionally, the pull request description is currently empty. It would be beneficial to add a brief explanation of the motivation for adding pytest (e.g., plans for new tests, migration of existing tests) to provide more context for reviewers.

'Examples of Different TurtleBot3 Usage.'
),
license='Apache License, Version 2.0',
tests_require=['pytest'],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Adding pytest to tests_require here is a valid step for setuptools, enabling python setup.py test to find pytest.

However, for ROS 2 packages, it's crucial to also declare test dependencies in package.xml. This ensures that ROS 2 build and test tools, such as colcon, can correctly identify and manage these dependencies.

Please consider adding the following to your package.xml file:

<test_depend>pytest</test_depend>

Reasoning:
ROS 2 build systems (e.g., colcon) primarily rely on package.xml for dependency resolution. If pytest is not listed as a <test_depend>, colcon test might fail to set up the testing environment correctly (e.g., pytest might not be installed or visible in the workspace). This can hinder the standard testing workflow for ROS 2 packages and cause issues in CI or for other developers.

@GyuH13 GyuH13 requested a review from robotpilot June 20, 2025 07:14
@robotpilot robotpilot self-assigned this Jun 20, 2025
@robotpilot robotpilot added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Jun 20, 2025
@github-project-automation github-project-automation Bot moved this to 🌱 Todo in Platform Jun 20, 2025
@robotpilot robotpilot moved this from 🌱 Todo to 📝 Pull Request in Platform Jun 20, 2025
Signed-off-by: Hyungyu Kim <kimhg@robotis.com>
Copy link
Copy Markdown
Member

@robotpilot robotpilot left a comment

Choose a reason for hiding this comment

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

LGTM

@robotpilot robotpilot merged commit 2e29cb0 into main Jun 20, 2025
10 checks passed
@robotpilot robotpilot deleted the feature-buildfarm-error-fix branch June 20, 2025 07:33
@github-project-automation github-project-automation Bot moved this from 📝 Pull Request to 🚩Done in Platform Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants