Skip to content
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
41 changes: 1 addition & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
check-style:
name: Find Trailing Whitespace
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Find Trailing Whitespace
Expand All @@ -23,42 +23,3 @@ jobs:
exit 1
fi
exit 0

build:
name: Generate python files from ui
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Remove broken apt repos [Ubuntu]
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
- name: Dependencies [Ubuntu]
run: |
sudo apt update
sudo apt install -y pyqt5-dev-tools
- name: Generate python files
run: |
bash ./generate-ui.sh

- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: autogenerated_files
path: robot_log_visualizer/ui/autogenerated

deploy:
runs-on: ubuntu-22.04
needs: [build]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: autogenerated_files
path: robot_log_visualizer/ui/autogenerated
- name: Deploy
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: ⚙️ Automatic update of the python UI classes
13 changes: 0 additions & 13 deletions generate-ui.sh

This file was deleted.

4 changes: 4 additions & 0 deletions robot_log_visualizer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import os

# Prefer the PySide6 backend when QtPy resolves the Qt binding.
os.environ.setdefault("QT_API", "pyside2")
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

The environment variable suggests PySide2, but the PR description mentions PyQt6. This inconsistency should be clarified - either the description should be updated to reflect PySide2 usage, or the backend preference should be changed to match the description.

Suggested change
os.environ.setdefault("QT_API", "pyside2")
os.environ.setdefault("QT_API", "pyside6")

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with the bot

8 changes: 6 additions & 2 deletions robot_log_visualizer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import sys

# GUI
from qtpy.QtWidgets import QApplication
from robot_log_visualizer.ui.gui import RobotViewerMainWindow
from PyQt5.QtWidgets import QApplication

# Meshcat
from robot_log_visualizer.robot_visualizer.meshcat_provider import MeshcatProvider
Expand Down Expand Up @@ -36,7 +36,11 @@ def main():
# show the main window
gui.show()

return app.exec_()
exec_method = getattr(app, "exec", None)
if exec_method is None:
exec_method = app.exec_

return exec_method()


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion robot_log_visualizer/plotter/pyqtgraph_viewer_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import numpy as np
import pyqtgraph as pg # type: ignore
from PyQt5 import QtCore, QtWidgets # type: ignore
from qtpy import QtCore, QtWidgets # type: ignore

from robot_log_visualizer.plotter.color_palette import ColorPalette
from robot_log_visualizer.signal_provider.signal_provider import ProviderType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import idyntree.swig as idyn
import numpy as np
from idyntree.visualize import MeshcatVisualizer
from PyQt5.QtCore import QMutex, QMutexLocker, QThread
from qtpy.QtCore import QMutex, QMutexLocker, QThread

from robot_log_visualizer.utils.utils import PeriodicThreadState

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import time
import traceback
from collections import deque
from typing import Iterable, Union

import numpy as np

Expand Down Expand Up @@ -117,7 +118,7 @@ def __init__(self, period: float, signal_root_name: str):
self.buffered_signals.add("robot_realtime::joints_state::positions")

# TODO: implement a logic to remove signals that are not needed anymore
def add_signals_to_buffer(self, signals: list | set | str):
def add_signals_to_buffer(self, signals: Union[str, Iterable[str]]):
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

[nitpick] Using Union[str, Iterable[str]] from typing module while also having from typing import Iterable, Union import is correct, but this could be simplified to use the modern str | Iterable[str] syntax if the codebase supports Python 3.10+.

Suggested change
def add_signals_to_buffer(self, signals: Union[str, Iterable[str]]):
def add_signals_to_buffer(self, signals: str | Iterable[str]):

Copilot uses AI. Check for mistakes.
"""Add signals to the buffer set."""
if isinstance(signals, str):
signals = {signals}
Expand Down
4 changes: 3 additions & 1 deletion robot_log_visualizer/signal_provider/signal_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
import h5py
import idyntree.swig as idyn
import numpy as np
from PyQt5.QtCore import QMutex, QMutexLocker, QThread, pyqtSignal
from qtpy.QtCore import QMutex, QMutexLocker, QThread, Signal

pyqtSignal = Signal

from robot_log_visualizer.utils.utils import PeriodicThreadState, RobotStatePath

Expand Down
Empty file.
36 changes: 0 additions & 36 deletions robot_log_visualizer/ui/autogenerated/about.py

This file was deleted.

29 changes: 0 additions & 29 deletions robot_log_visualizer/ui/autogenerated/plot_tab.py

This file was deleted.

130 changes: 0 additions & 130 deletions robot_log_visualizer/ui/autogenerated/set_robot_model.py

This file was deleted.

30 changes: 0 additions & 30 deletions robot_log_visualizer/ui/autogenerated/video_tab.py

This file was deleted.

Loading