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

[pre-commit.ci] pre-commit autoupdate #505

Merged
merged 6 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/workflows/ci-pre-commit.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/industrial-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Industrial CI

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'
16 changes: 0 additions & 16 deletions .github/workflows/source-build.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/update-pre-commit.yaml

This file was deleted.

7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -80,3 +80,6 @@ repos:
hooks:
- id: codespell
args: ['--write-changes', '--ignore-words-list=theses']

ci:
autoupdate_schedule: quarterly
28 changes: 14 additions & 14 deletions mission/gui_auv/auv_gui/auv_gui.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down