diff --git a/.github/workflows/black.yaml b/.github/workflows/black.yaml index ab5e1b3f..bd5a81f1 100644 --- a/.github/workflows/black.yaml +++ b/.github/workflows/black.yaml @@ -3,7 +3,6 @@ name: Black python lint on: workflow_call: - push: jobs: lint: diff --git a/.github/workflows/bump_version.yaml b/.github/workflows/bump_version.yaml index 862949d7..ed028903 100644 --- a/.github/workflows/bump_version.yaml +++ b/.github/workflows/bump_version.yaml @@ -12,6 +12,9 @@ on: types: [closed] jobs: + industrial_ci: + uses: ./.github/workflows/industrial_ci.yaml + get-bump: name: Get version bump runs-on: ubuntu-latest diff --git a/.github/workflows/industrial_ci.yaml b/.github/workflows/industrial_ci.yaml index 54304f4f..8867fdf7 100644 --- a/.github/workflows/industrial_ci.yaml +++ b/.github/workflows/industrial_ci.yaml @@ -2,12 +2,17 @@ name: Industrial CI on: workflow_call: - pull_request: + workflow_dispatch: push: - branches: - - master + jobs: + black_test: + uses: ./.github/workflows/black.yaml + + spellcheck_test: + uses: ./.github/workflows/spellcheck.yaml + industrial_ci: strategy: fail-fast: false diff --git a/.github/workflows/spellcheck.yaml b/.github/workflows/spellcheck.yaml index a35fb0c1..84317935 100644 --- a/.github/workflows/spellcheck.yaml +++ b/.github/workflows/spellcheck.yaml @@ -1,14 +1,14 @@ +--- name: Spellcheck Action on: - workflow_call: - push: + workflow_call: jobs: - build: - name: Spellcheck - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: rojopolis/spellcheck-github-actions@0.33.1 - name: Spellcheck + build: + name: Spellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: rojopolis/spellcheck-github-actions@0.33.1 + name: Spellcheck diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0664b224..a71dc9ba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,10 +32,10 @@ repos: files: ^.github|./\.yaml - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.10.1 hooks: - id: black - args: ["--line-length=99"] + args: ["--line-length=99", "--experimental-string-processing"] - repo: https://github.com/PyCQA/flake8 rev: 6.1.0 diff --git a/rosbot_xl_bringup/launch/bringup.launch.py b/rosbot_xl_bringup/launch/bringup.launch.py index 2bf5d487..08b7d3a8 100644 --- a/rosbot_xl_bringup/launch/bringup.launch.py +++ b/rosbot_xl_bringup/launch/bringup.launch.py @@ -30,7 +30,9 @@ def generate_launch_description(): declare_mecanum_arg = DeclareLaunchArgument( "mecanum", default_value="False", - description="Whether to use mecanum drive controller (otherwise diff drive controller is used)", + description=( + "Whether to use mecanum drive controller (otherwise diff drive controller is used)" + ), ) lidar_model = LaunchConfiguration("lidar_model") diff --git a/rosbot_xl_controller/test/test_diff_drive_controllers.py b/rosbot_xl_controller/test/test_diff_drive_controllers.py index dcb768c3..f7d12ecc 100644 --- a/rosbot_xl_controller/test/test_diff_drive_controllers.py +++ b/rosbot_xl_controller/test/test_diff_drive_controllers.py @@ -58,15 +58,20 @@ def test_controllers_startup_fail(): node.start_node_thread() msgs_received_flag = node.joint_state_msg_event.wait(timeout=10.0) - assert ( - not msgs_received_flag - ), "Expected JointStates message not received. Check joint_state_broadcaster!" + assert not msgs_received_flag, ( + "Received JointStates message that should not have appeared. Check whether other" + " robots are connected to your network.!" + ) msgs_received_flag = node.odom_msg_event.wait(timeout=10.0) - assert ( - not msgs_received_flag - ), "Expected Odom message not received. Check rosbot_base_controller!" + assert not msgs_received_flag, ( + "Received Odom message that should not have appeared. Check whether other robots are" + " connected to your network.!" + ) msgs_received_flag = node.imu_msg_event.wait(timeout=10.0) - assert not msgs_received_flag, "Expected Imu message not received. Check imu_broadcaster!" + assert not msgs_received_flag, ( + "Received Imu message that should not have appeared. Check whether other robots are" + " connected to your network.!" + ) finally: rclpy.shutdown() diff --git a/rosbot_xl_controller/test/test_mecanum_controllers.py b/rosbot_xl_controller/test/test_mecanum_controllers.py index 484dd564..2b8a1567 100644 --- a/rosbot_xl_controller/test/test_mecanum_controllers.py +++ b/rosbot_xl_controller/test/test_mecanum_controllers.py @@ -58,15 +58,20 @@ def test_controllers_startup_fail(): node.start_node_thread() msgs_received_flag = node.joint_state_msg_event.wait(timeout=10.0) - assert ( - not msgs_received_flag - ), "Expected JointStates message not received. Check joint_state_broadcaster!" + assert not msgs_received_flag, ( + "Received JointStates message that should not have appeared. Check whether other" + " robots are connected to your network.! aaaaaaaaaaaaaaaaaaaaaaaaaaa" + ) msgs_received_flag = node.odom_msg_event.wait(timeout=10.0) - assert ( - not msgs_received_flag - ), "Expected Odom message not received. Check rosbot_base_controller!" + assert not msgs_received_flag, ( + "Received Odom message that should not have appeared. Check whether other robots are" + " connected to your network.!" + ) msgs_received_flag = node.imu_msg_event.wait(timeout=10.0) - assert not msgs_received_flag, "Expected Imu message not received. Check imu_broadcaster!" + assert not msgs_received_flag, ( + "Received Imu message that should not have appeared. Check whether other robots are" + " connected to your network.!" + ) finally: rclpy.shutdown() diff --git a/rosbot_xl_gazebo/launch/simulation.launch.py b/rosbot_xl_gazebo/launch/simulation.launch.py index c4906b1b..2a57c2a0 100644 --- a/rosbot_xl_gazebo/launch/simulation.launch.py +++ b/rosbot_xl_gazebo/launch/simulation.launch.py @@ -33,7 +33,9 @@ def generate_launch_description(): declare_mecanum_arg = DeclareLaunchArgument( "mecanum", default_value="False", - description="Whether to use mecanum drive controller (otherwise diff drive controller is used)", + description=( + "Whether to use mecanum drive controller (otherwise diff drive controller is used)" + ), ) lidar_model = LaunchConfiguration("lidar_model")