From 7a100a8dc54fcabec11c33967579425a9360d956 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 21:02:20 +0000 Subject: [PATCH 1/6] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.4 → v0.8.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.4...v0.8.0) - [github.com/pre-commit/mirrors-clang-format: v19.1.3 → v19.1.4](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.3...v19.1.4) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 57c99b9d..c7300a82 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: - id: requirements-txt-fixer # Python hooks - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.4 + rev: v0.8.0 hooks: - id: ruff-format - id: ruff @@ -70,7 +70,7 @@ repos: pass_filenames: true # C++ hooks - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v19.1.3 + rev: v19.1.4 hooks: - id: clang-format args: [--style=file] From 07e52331cfe49eb32e2086823f0ae4b162040a60 Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud Date: Tue, 26 Nov 2024 10:43:03 +0100 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=94=A5=20ci(pre-commit):=20removed=20?= =?UTF-8?q?old=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-pre-commit.yaml | 11 ----------- .github/workflows/update-pre-commit.yaml | 13 ------------- 2 files changed, 24 deletions(-) delete mode 100644 .github/workflows/ci-pre-commit.yaml delete mode 100644 .github/workflows/update-pre-commit.yaml diff --git a/.github/workflows/ci-pre-commit.yaml b/.github/workflows/ci-pre-commit.yaml deleted file mode 100644 index 642bb7fb..00000000 --- a/.github/workflows/ci-pre-commit.yaml +++ /dev/null @@ -1,11 +0,0 @@ -name: Run Pre-Commit Workflow -# Run pre-commit hooks on a repository -on: - workflow_dispatch: - pull_request: -jobs: - call_reusable_workflow: - uses: vortexntnu/vortex-ci/.github/workflows/reusable-pre-commit.yaml@main - with: - ref: ${{ github.ref }} - python_version: '3.11' diff --git a/.github/workflows/update-pre-commit.yaml b/.github/workflows/update-pre-commit.yaml deleted file mode 100644 index 1246b33f..00000000 --- a/.github/workflows/update-pre-commit.yaml +++ /dev/null @@ -1,13 +0,0 @@ -name: Run Pre-Commit Update Workflow -# Update pre-commit config and create a pull request if changes are detected -on: - workflow_dispatch: - schedule: - - cron: "0 0 1 * *" # Run every month at midnight on the first day of the month -jobs: - call_reusable_workflow: - uses: vortexntnu/vortex-ci/.github/workflows/reusable-update-pre-commit.yaml@main - with: - ref: ${{ github.ref }} - python_version: '3.10' - responsible: 'kluge7' From c6a22e651211ca7ab95f35748198e0267d90341b Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud Date: Tue, 26 Nov 2024 10:49:55 +0100 Subject: [PATCH 3/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(auv=5Fgui):?= =?UTF-8?q?=20applied=20pydocstyle=20and=20update=20type=20annotations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mission/gui_auv/auv_gui/auv_gui.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/mission/gui_auv/auv_gui/auv_gui.py b/mission/gui_auv/auv_gui/auv_gui.py index 9257c691..25ef8a7d 100644 --- a/mission/gui_auv/auv_gui/auv_gui.py +++ b/mission/gui_auv/auv_gui/auv_gui.py @@ -1,7 +1,7 @@ import math import sys from threading import Thread -from typing import List, Optional +from typing import Optional import matplotlib.pyplot as plt import numpy as np @@ -25,7 +25,7 @@ # --- Quaternion to Euler angles --- -def quaternion_to_euler(x: float, y: float, z: float, w: float) -> List[float]: +def quaternion_to_euler(x: float, y: float, z: float, w: float) -> list[float]: """Convert a quaternion to Euler angles (roll, pitch, yaw). Args: @@ -92,14 +92,14 @@ def __init__(self) -> None: ) # Variables to store odometry data - self.xpos_data: List[float] = [] # x position - self.ypos_data: List[float] = [] # y position - self.zpos_data: List[float] = [] # z position + self.xpos_data: list[float] = [] # x position + self.ypos_data: list[float] = [] # y position + self.zpos_data: list[float] = [] # z position - self.w_data: List[float] = [] # w component of the quaternion - self.x_data: List[float] = [] # x component of the quaternion - self.y_data: List[float] = [] # y component of the quaternion - self.z_data: List[float] = [] # z component of the quaternion + self.w_data: list[float] = [] # w component of the quaternion + self.x_data: list[float] = [] # x component of the quaternion + self.y_data: list[float] = [] # y component of the quaternion + self.z_data: list[float] = [] # z component of the quaternion self.roll: Optional[float] = None self.pitch: Optional[float] = None @@ -196,13 +196,13 @@ def __init__(self, gui_node: GuiNode, parent: Optional[QWidget] = None) -> None: self.ax.set_title("Position") # Initialize data lists for 3D plot - self.x_data: List[float] = [] - self.y_data: List[float] = [] - self.z_data: List[float] = [] + self.x_data: list[float] = [] + self.y_data: list[float] = [] + self.z_data: list[float] = [] (self.line,) = self.ax.plot([], [], [], 'b-') def update_plot( - self, x_data: List[float], y_data: List[float], z_data: List[float] + self, x_data: list[float], y_data: list[float], z_data: list[float] ) -> None: """Update the 3D plot with the latest odometry data.""" # Convert lists to numpy arrays to ensure compatibility with the plot functions @@ -238,7 +238,7 @@ def run_ros_node(ros_node: GuiNode, executor: MultiThreadedExecutor) -> None: rclpy.spin(ros_node, executor) -def main(args: Optional[List[str]] = None) -> None: +def main(args: Optional[list[str]] = None) -> None: """The main function to initialize ROS2 and the GUI application.""" rclpy.init(args=args) ros_node = GuiNode() From 7e9e256a3b853a013cbabe035c1776c3fd42bbcd Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud Date: Tue, 26 Nov 2024 10:56:25 +0100 Subject: [PATCH 4/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20ci(workflows):=20repla?= =?UTF-8?q?ced=20source=20build=20with=20industrial=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/industrial-ci.yml | 12 ++++++++++++ .github/workflows/source-build.yaml | 16 ---------------- 2 files changed, 12 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/industrial-ci.yml delete mode 100644 .github/workflows/source-build.yaml diff --git a/.github/workflows/industrial-ci.yml b/.github/workflows/industrial-ci.yml new file mode 100644 index 00000000..a5c44d8e --- /dev/null +++ b/.github/workflows/industrial-ci.yml @@ -0,0 +1,12 @@ +name: Build status +# Run industrial-ci on a repository +on: + push: + workflow_dispatch: + schedule: + - cron: '0 1 * * *' # Runs daily to check for dependency issues or flaking tests +jobs: + call_reusable_workflow: + uses: vortexntnu/vortex-ci/.github/workflows/reusable-industrial-ci.yml@main + with: + upstream_workspace: './ros2.repos' diff --git a/.github/workflows/source-build.yaml b/.github/workflows/source-build.yaml deleted file mode 100644 index 802f5363..00000000 --- a/.github/workflows/source-build.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: Source Build -# Build the ROS 2 workspace from source code and run tests -on: - workflow_dispatch: - pull_request: - # Runs daily to check for dependency issues or flaking tests - schedule: - - cron: "0 1 * * *" -jobs: - source-build: - uses: vortexntnu/vortex-ci/.github/workflows/reusable-source-build.yaml@main - with: - ros_distro: 'humble' - os_name: 'ubuntu-22.04' - ref: ${{ github.ref_name }} - vcs_repo_file_url: 'https://raw.githubusercontent.com/vortexntnu/vortex-auv/main/ros2.repos' From ead3813e141f3c0198187ed728bda4affc839b4b Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud Date: Tue, 26 Nov 2024 14:12:51 +0100 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=94=A7=20ci(pre-commit):=20set=20auto?= =?UTF-8?q?update=5Fschedule=20to=20quarterly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c7300a82..4a0d0fa3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -80,3 +80,6 @@ repos: hooks: - id: codespell args: ['--write-changes', '--ignore-words-list=theses'] + +ci: + autoupdate_schedule: quarterly From 9213f9ce8bc07329df56b0da2b36bd0d8dbe1703 Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud Date: Tue, 26 Nov 2024 14:35:55 +0100 Subject: [PATCH 6/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20ci(workflows):=20updat?= =?UTF-8?q?ed=20workflow=20name=20for=20indusrial-ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/industrial-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/industrial-ci.yml b/.github/workflows/industrial-ci.yml index a5c44d8e..32c67bec 100644 --- a/.github/workflows/industrial-ci.yml +++ b/.github/workflows/industrial-ci.yml @@ -1,5 +1,5 @@ -name: Build status -# Run industrial-ci on a repository +name: Industrial CI + on: push: workflow_dispatch: