From 8c4cca061e817df28e3ad7153e586616859821b1 Mon Sep 17 00:00:00 2001 From: Jasper-Harvey0 Date: Wed, 22 Jul 2026 08:57:44 +1000 Subject: [PATCH 1/6] Add obvious sequence finish PASS/FAIL indication --- src/fixate/ui_gui_qt/layout.py | 3 +++ src/fixate/ui_gui_qt/ui_gui_qt.py | 33 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/fixate/ui_gui_qt/layout.py b/src/fixate/ui_gui_qt/layout.py index 7812848a..98143c3a 100644 --- a/src/fixate/ui_gui_qt/layout.py +++ b/src/fixate/ui_gui_qt/layout.py @@ -212,6 +212,7 @@ def setupUi(self, FixateUI): self.ButtonLayout.setSpacing(100) self.ButtonLayout.setObjectName("ButtonLayout") self.Button_1 = QtWidgets.QPushButton(self.MainWindow) + self.Button_1.setStyleSheet("font-size: 12pt;") self.Button_1.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding @@ -227,6 +228,7 @@ def setupUi(self, FixateUI): self.Button_1.setObjectName("Button_1") self.ButtonLayout.addWidget(self.Button_1) self.Button_2 = QtWidgets.QPushButton(self.MainWindow) + self.Button_2.setStyleSheet("font-size: 12pt;") self.Button_2.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding @@ -239,6 +241,7 @@ def setupUi(self, FixateUI): self.Button_2.setObjectName("Button_2") self.ButtonLayout.addWidget(self.Button_2) self.Button_3 = QtWidgets.QPushButton(self.MainWindow) + self.Button_3.setStyleSheet("font-size: 12pt;") self.Button_3.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding diff --git a/src/fixate/ui_gui_qt/ui_gui_qt.py b/src/fixate/ui_gui_qt/ui_gui_qt.py index 55f2395f..924863c7 100644 --- a/src/fixate/ui_gui_qt/ui_gui_qt.py +++ b/src/fixate/ui_gui_qt/ui_gui_qt.py @@ -94,6 +94,7 @@ class FixateGUI(QtWidgets.QMainWindow, layout.Ui_FixateUI): sig_image_update = pyqtSignal(str) sig_gif_update = pyqtSignal(str) sig_image_clear = pyqtSignal() + sig_image_result = pyqtSignal(str, str) # Progress Signals sig_indicator_start = pyqtSignal() @@ -181,6 +182,7 @@ def bind_qt_signals(self): self.sig_image_update.connect(self.on_image_update) self.sig_gif_update.connect(self.on_gif_update) self.sig_image_clear.connect(self.on_image_clear) + self.sig_image_result.connect(self._show_sequence_result) self.sig_button_reset.connect(self.on_button_reset) self.sig_progress_set_max.connect(self.on_progress_set_max) @@ -264,6 +266,7 @@ def on_image_update(self, path): :param path: Relative path to image within the test scripts package :return: None """ + self.ImageView.setBackgroundBrush(QtGui.QBrush()) try: image_data = pkgutil.get_data("module.loaded_tests", path) except (FileNotFoundError, OSError): @@ -300,6 +303,7 @@ def on_gif_update(self, path): :param path: Relative path to gif within the test scripts package :return: None """ + self.ImageView.setBackgroundBrush(QtGui.QBrush()) try: image_data = pkgutil.get_data("module.loaded_tests", path) except (FileNotFoundError, OSError): @@ -353,6 +357,29 @@ def on_image_clear(self): self.ImageView.set_scene(self.image_scene) self.ImageView.setScene(self.image_scene) + def _show_sequence_result(self, text, fill_colour): + self.on_image_clear() # Clear the scene + # Set background + self.ImageView.setBackgroundBrush(QtGui.QBrush(QtGui.QColor(fill_colour))) + + viewport_rect = self.ImageView.viewport().rect() + scene_width = viewport_rect.width() + scene_height = viewport_rect.height() + text_item = self.image_scene.addText( + text, QtGui.QFont("Arial", 14, QtGui.QFont.Bold) + ) + text_item.setDefaultTextColor(QtGui.QColor("white")) + + text_bounds = text_item.boundingRect() + text_item.setPos( + (scene_width - text_bounds.width()) / 2, + (scene_height - text_bounds.height()) / 2, + ) + + scene_rect = QRectF(0, 0, scene_width, scene_height) + self.image_scene.setSceneRect(scene_rect) + self.ImageView.fitInView(scene_rect, Qt.KeepAspectRatio) + def file_not_found(self, path): """ Display warning box for an invalid image path @@ -834,6 +861,12 @@ def _topic_Sequence_Complete( self.sig_active_update.emit(self._reformat_text("Status: {}".format(status))) self.sig_history_update.emit("#" * wrapper.width) + # Emit signal to update the image window: + if status == "PASSED": + self.sig_image_result.emit("TEST PASS", "#2ECC71") + elif status != "PASSED": + self.sig_image_result.emit("TEST FAIL", "#E74C3C") + def _print_test_start(self, data, test_index): if self.closing: return From 52ebf8e1c7a6dc9fbc2075fa4e575528c9eea82d Mon Sep 17 00:00:00 2001 From: Jasper-Harvey0 Date: Wed, 22 Jul 2026 09:00:23 +1000 Subject: [PATCH 2/6] Add release notes --- docs/release-notes.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 0bd008e8..012a8b2e 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -1,6 +1,17 @@ ================================== Release Notes ================================== +************* +Version 0.7.0 +************* +Release Date XX/XX/2026 + +New Features +############ +- Font size for buttons increased. +- Image scene now shows "TEST PASS" or "TEST FAIL" on sequence end. + + ************* Version 0.6.5 From 96ecc5a5f0a0d8ecfcc52c9c7f20593ee855ffba Mon Sep 17 00:00:00 2001 From: Jasper-Harvey0 Date: Wed, 22 Jul 2026 09:06:10 +1000 Subject: [PATCH 3/6] Didn't end up needing the brush reset. --- src/fixate/ui_gui_qt/ui_gui_qt.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/fixate/ui_gui_qt/ui_gui_qt.py b/src/fixate/ui_gui_qt/ui_gui_qt.py index 924863c7..a7d21bd8 100644 --- a/src/fixate/ui_gui_qt/ui_gui_qt.py +++ b/src/fixate/ui_gui_qt/ui_gui_qt.py @@ -266,7 +266,6 @@ def on_image_update(self, path): :param path: Relative path to image within the test scripts package :return: None """ - self.ImageView.setBackgroundBrush(QtGui.QBrush()) try: image_data = pkgutil.get_data("module.loaded_tests", path) except (FileNotFoundError, OSError): @@ -303,7 +302,6 @@ def on_gif_update(self, path): :param path: Relative path to gif within the test scripts package :return: None """ - self.ImageView.setBackgroundBrush(QtGui.QBrush()) try: image_data = pkgutil.get_data("module.loaded_tests", path) except (FileNotFoundError, OSError): From 2ce09a16f64ead189ada09f8c63bc64e4c768b88 Mon Sep 17 00:00:00 2001 From: Jasper-Harvey0 Date: Wed, 22 Jul 2026 13:06:40 +1000 Subject: [PATCH 4/6] Add user_id argument that gets added to the logfile --- src/fixate/config/__init__.py | 1 + src/fixate/main.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/fixate/config/__init__.py b/src/fixate/config/__init__.py index 7a66238a..72f9e179 100644 --- a/src/fixate/config/__init__.py +++ b/src/fixate/config/__init__.py @@ -56,6 +56,7 @@ "report-format={REPORT_FORMAT_VERSION}", "index_string={index}", "computername={COMPUTERNAME}", + "user_id={user_id}", ], } diff --git a/src/fixate/main.py b/src/fixate/main.py index 1db36bdd..f9f93b55 100644 --- a/src/fixate/main.py +++ b/src/fixate/main.py @@ -117,6 +117,7 @@ def get_parser(): action="store_true", help="The sequencer will not prompt for retries.", ) + parser.add_argument("--user-id", help="ID of the user running the test") diagnostic_group = parser.add_mutually_exclusive_group() diagnostic_group.add_argument( "--disable-logs", action="store_true", help="Turn off diagnostic logs" @@ -289,6 +290,9 @@ def ui_run(self): if self.args.non_interactive: self.sequencer.non_interactive = True + if self.args.user_id: + self.sequencer.context_data["user_id"] = self.args.user_id + # parse script params for param in self.args.script_params: k, v = param.split("=") From 866bcbcc5ecdb33e74d10b5ff88b20828bd07ef6 Mon Sep 17 00:00:00 2001 From: Jasper-Harvey0 Date: Wed, 22 Jul 2026 15:41:00 +1000 Subject: [PATCH 5/6] Add better comments --- src/fixate/ui_gui_qt/ui_gui_qt.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fixate/ui_gui_qt/ui_gui_qt.py b/src/fixate/ui_gui_qt/ui_gui_qt.py index a7d21bd8..c8993b31 100644 --- a/src/fixate/ui_gui_qt/ui_gui_qt.py +++ b/src/fixate/ui_gui_qt/ui_gui_qt.py @@ -356,8 +356,11 @@ def on_image_clear(self): self.ImageView.setScene(self.image_scene) def _show_sequence_result(self, text, fill_colour): - self.on_image_clear() # Clear the scene - # Set background + """ + Uses the image window to show overall sequence status. + Paints entire background with 'fill_colour', and centers 'text' on screen. + """ + self.on_image_clear() self.ImageView.setBackgroundBrush(QtGui.QBrush(QtGui.QColor(fill_colour))) viewport_rect = self.ImageView.viewport().rect() From 8975f3b19c85ab0d202b33eee9396d40d38a69c2 Mon Sep 17 00:00:00 2001 From: Jasper-Harvey0 Date: Wed, 22 Jul 2026 15:45:11 +1000 Subject: [PATCH 6/6] Bump version. Update release notes --- docs/release-notes.rst | 7 ++++++- src/fixate/__init__.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 012a8b2e..3a649919 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -4,12 +4,17 @@ Release Notes ************* Version 0.7.0 ************* -Release Date XX/XX/2026 +Release Date 24/07/2026 + +Major Changes +################ +- New major version! This should have been done in the last update when python 3.8 to 3.11 was dropped. Doing it here now. New Features ############ - Font size for buttons increased. - Image scene now shows "TEST PASS" or "TEST FAIL" on sequence end. +- Added --user-id flag to be able to log which user ran a test. Defaults to 'None' if not provided. diff --git a/src/fixate/__init__.py b/src/fixate/__init__.py index 39ff3a38..653eba9b 100644 --- a/src/fixate/__init__.py +++ b/src/fixate/__init__.py @@ -51,4 +51,4 @@ from fixate.main import run_main_program as run -__version__ = "0.6.5" +__version__ = "0.7.0"