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

Add pre-commit workflow #395

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Conversation

rafal-gorecki
Copy link
Contributor

@rafal-gorecki rafal-gorecki commented Aug 22, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a "Pre-Commit" GitHub Actions workflow for automated code quality checks on push events.
  • Updates

    • Updated versions of various pre-commit hooks to include the latest features and fixes.
  • Documentation

    • Streamlined formatting of the "Beta Release" notice in the ROS API documentation.
  • Refactor

    • Removed unnecessary import statements in the launch file to simplify dependencies.

Copy link
Contributor

coderabbitai bot commented Aug 22, 2024

Walkthrough

A new GitHub Actions workflow named "Pre-Commit" has been introduced, which automates pre-commit checks for code quality using a reusable workflow from the ros-controls/ros2_control_ci repository. Additionally, the versions of several pre-commit hooks have been updated in the configuration file. Minor formatting changes have been made to the ROS API documentation and an import statement has been removed from a launch file to simplify dependencies.

Changes

File Change Summary
.github/workflows/pre-commit.yaml Introduced a new GitHub Actions workflow for automated pre-commit checks using ROS distribution "humble."
.pre-commit-config.yaml Updated versions of pre-commit hooks: clang-format (v18.1.6 to v18.1.8), black (24.4.2 to 24.8.0), flake8 (7.1.0 to 7.1.1), pre-commit-hooks-ros (v0.8.0 to v0.10.0).
ROS_API.md Removed unnecessary whitespace lines from the "Beta Release" notice formatting.
panther_localization/launch/nmea_navsat.launch.py Removed the import statement for ReplaceString from nav2_common.launch, simplifying dependencies.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between cdafc74 and 08d984f.

Files selected for processing (4)
  • .github/workflows/pre-commit.yaml (1 hunks)
  • .pre-commit-config.yaml (3 hunks)
  • ROS_API.md (1 hunks)
  • panther_localization/launch/nmea_navsat.launch.py (1 hunks)
Files skipped from review due to trivial changes (4)
  • .github/workflows/pre-commit.yaml
  • .pre-commit-config.yaml
  • ROS_API.md
  • panther_localization/launch/nmea_navsat.launch.py

@rafal-gorecki rafal-gorecki merged commit 415a28e into ros2-devel Aug 22, 2024
1 check passed
delihus added a commit that referenced this pull request Aug 28, 2024
* Implement testing POC

* Namespace refactor

* Add EStop to Gazebo

* unify CMakeLists.txt files

* Add dependencies

* Add remapping

* Rename files in panther_diagnostics package

* Update after changes in panther_diagnostics

* Rename config and launch file in manager package

* Correct include guards in manager package

* Restructure files tree in manager tests

* Ros2 estop sim gui (#384)

* New format of documentation  (#369)

* Change 3 package for demo

* Improve ROS_API

* fix links

* Update

* Update

* Table improvements

* Format

* Save work

* Save work

* update

* fix

* fix

* fix

* fix

* fix

* Add API warning

* Improve links

* lights simplify

* Create CONFIGURATION.md files

* Typos

* pre-commit

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Save work

* Final unification

* Delete trash

* typos

* Update README.md

* Update ROS_API.md

* Update ROS_API.md

* Update README.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Change initial warning to beta warning

* improve warn rendering

* rendering

* Update Diagram

* Add Dawid suggestions

* Dot

* Change diagram ext and typos

* Do not describe external nodes

* Add Dawid suggestons

* Add last Dawid suggestions

* Format

* Pawel suggestions

* Diagram improvements

* Update

* Diagram Visual

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Change scheme theme (#380)

* unify CMakeLists.txt files (#381)

* First working version

* Ros2 increase bt service timeout (#382)

* Parametrize and increase service timeout in managers

* Format panther API drawio file

* Add Estop GUI and docs

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Paweł Irzyk <[email protected]>
Co-authored-by: Dawid Kmak <[email protected]>

* Update panther_gazebo/panther_hardware_plugins.xml

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add david suggestion and change gui layout

* Typos in Readme + estop publish on service call

* Reorganize files in panther_lights

* UPdate include guards in panther_lights

* Reorganize files in panther_battery

* Move estop to plugins folder

* add nmea gps

* Rename battery driver files

* Rename shutdown hosts config

* Inherit from IgnitionSystem

* Change to Estop -> EStop

* Reorganize panther_hardware_interfaces files

* Dawid suggestions part 1

* Rename PantherSystem -> GzPantherSystem

* Update references to files

* Rename battery exec

* Fix links in documentations (#387)

* Refer to header files

* Update panther_gazebo/include/panther_gazebo/gz_panther_system.hpp

Co-authored-by: Dawid Kmak <[email protected]>

* Update panther_gazebo/src/gz_panther_system.cpp

Co-authored-by: Dawid Kmak <[email protected]>

* Update panther_gazebo/src/gz_panther_system.cpp

Co-authored-by: Dawid Kmak <[email protected]>

* Dawid suggestions

* delete typo

* Minor modifications

* Move BT plugins to src directory

* Reorganize test utilities in hardware_interfaces

* Merge remote-tracking branch 'origin/ros2-devel' into ros2-testing-poc

* Add missing module configuration

* Update panther_gazebo/include/panther_gazebo/gz_panther_system.hpp

Co-authored-by: Dawid Kmak <[email protected]>

* Dawid suggestions

* update docs

* Extend filesystem responsibility

* Update ROS_API.md

Co-authored-by: Paweł Irzyk <[email protected]>

* update names

* Add new common utility functions

* System monitor improvements

* Round temperature precision

* Implement filesystem unit tests

* Formatting

* Add integration tests condition

* Update ROS_API.md

* Review changes

* Add pre-commit workflow (#395)

---------

Co-authored-by: pawelirh <[email protected]>
Co-authored-by: rafal-gorecki <[email protected]>
Co-authored-by: Dawid <[email protected]>
Co-authored-by: rafal-gorecki <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Paweł Irzyk <[email protected]>
Co-authored-by: Dawid Kmak <[email protected]>
@rafal-gorecki rafal-gorecki deleted the ros2-pre-commit-workflow branch September 17, 2024 08:07
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.

2 participants