From b0c315d5d760c2ffbc2de984c0fe0d53b408dd24 Mon Sep 17 00:00:00 2001 From: pdesanex Date: Fri, 7 Jun 2024 15:20:42 +0100 Subject: [PATCH 1/3] fix validation for Alyx when no Alyx URL has been set --- CHANGELOG.md | 4 ++++ iblrig/__init__.py | 2 +- iblrig/hardware_validation.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1865b385b..0f4acac1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Changelog --------- +8.19.4 +------ +* hotfix: fix validation for Alyx when no Alyx URL has been set + 8.19.3 ------ * hotfix: force stimulus to freeze in center of screen during "freeze_reward" state diff --git a/iblrig/__init__.py b/iblrig/__init__.py index 8ae8a2570..6272bca53 100644 --- a/iblrig/__init__.py +++ b/iblrig/__init__.py @@ -6,7 +6,7 @@ # 5) git tag the release in accordance to the version number below (after merge!) # >>> git tag 8.15.6 # >>> git push origin --tags -__version__ = '8.19.3' +__version__ = '8.19.4' from iblrig.version_management import get_detailed_version_string diff --git a/iblrig/hardware_validation.py b/iblrig/hardware_validation.py index 5551527b4..51c603d28 100644 --- a/iblrig/hardware_validation.py +++ b/iblrig/hardware_validation.py @@ -433,7 +433,7 @@ def _run(self): # Validate ALYX_URL if self.iblrig_settings.ALYX_URL is None: yield Result(Status.SKIP, 'ALYX_URL has not been set in hardware_settings.yaml - skipping validation') - raise StopIteration(False) + return False elif not internet_available(timeout=2, force_update=True): yield Result( Status.FAIL, f'Cannot connect to {self.iblrig_settings.ALYX_URL.host}', solution='Check your Internet connection' From b2cc263343010d4b25012f876657095994b415d9 Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Fri, 7 Jun 2024 15:38:12 +0100 Subject: [PATCH 2/3] change update instructions --- CHANGELOG.md | 1 + docs/source/installation.rst | 9 ----- iblrig/gui/ui_update.py | 40 +++++++++----------- iblrig/gui/ui_update.ui | 73 ++++++++++++------------------------ 4 files changed, 43 insertions(+), 80 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f4acac1b..cc8b19135 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Changelog 8.19.4 ------ * hotfix: fix validation for Alyx when no Alyx URL has been set +* adapted update instructions in update notification & documentation 8.19.3 ------ diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 93bfab880..d1cf06890 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -221,15 +221,6 @@ Updating iblrigv8 To update iblrigv8 to the newest version: -.. code-block:: powershell - - C:\iblrigv8\venv\scripts\Activate.ps1 - upgrade_iblrig - - -If you're on an older version of iblrigv8, the command above may not be available yet. -You can then run the following instead: - .. code-block:: powershell C:\iblrigv8\venv\scripts\Activate.ps1 diff --git a/iblrig/gui/ui_update.py b/iblrig/gui/ui_update.py index e4f7c6e70..aae550e90 100644 --- a/iblrig/gui/ui_update.py +++ b/iblrig/gui/ui_update.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -# Form implementation generated from reading ui file 'iblrig/gui/ui_update.ui' +# Form implementation generated from reading ui file 'iblrig\gui\ui_update.ui' # -# Created by: PyQt5 UI code generator 5.15.9 +# Created by: PyQt5 UI code generator 5.15.10 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. @@ -21,7 +21,7 @@ def setupUi(self, update): sizePolicy.setHeightForWidth(update.sizePolicy().hasHeightForWidth()) update.setSizePolicy(sizePolicy) icon = QtGui.QIcon() - icon.addPixmap(QtGui.QPixmap("iblrig/gui/wizard.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon.addPixmap(QtGui.QPixmap("iblrig\\gui\\wizard.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) update.setWindowIcon(icon) update.setModal(True) self.horizontalLayout_2 = QtWidgets.QHBoxLayout(update) @@ -45,6 +45,7 @@ def setupUi(self, update): self.uiLabelHeader.setObjectName("uiLabelHeader") self.uiLayoutRight.addWidget(self.uiLabelHeader) self.uiTextBrowserChanges = QtWidgets.QTextBrowser(update) + self.uiTextBrowserChanges.setSizeIncrement(QtCore.QSize(0, 0)) self.uiTextBrowserChanges.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) self.uiTextBrowserChanges.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.uiTextBrowserChanges.setMarkdown("") @@ -63,23 +64,15 @@ def setupUi(self, update): self.uiLayoutRight.addWidget(self.uiLabelFooter) spacerItem1 = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.uiLayoutRight.addItem(spacerItem1) - self.uiLayoutCommand = QtWidgets.QHBoxLayout() - self.uiLayoutCommand.setObjectName("uiLayoutCommand") - spacerItem2 = QtWidgets.QSpacerItem(1, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.uiLayoutCommand.addItem(spacerItem2) - self.uiLineEditCommand = QtWidgets.QLineEdit(update) - self.uiLineEditCommand.setStyleSheet("background-color: rgb(1, 36, 86);\n" + self.plainTextEdit = QtWidgets.QPlainTextEdit(update) + self.plainTextEdit.setMaximumSize(QtCore.QSize(16777215, 37)) + self.plainTextEdit.setStyleSheet("background-color: rgb(1, 36, 86);\n" "color: rgb(255, 255, 255);") - self.uiLineEditCommand.setFrame(False) - self.uiLineEditCommand.setAlignment(QtCore.Qt.AlignCenter) - self.uiLineEditCommand.setReadOnly(True) - self.uiLineEditCommand.setObjectName("uiLineEditCommand") - self.uiLayoutCommand.addWidget(self.uiLineEditCommand) - spacerItem3 = QtWidgets.QSpacerItem(1, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.uiLayoutCommand.addItem(spacerItem3) - self.uiLayoutRight.addLayout(self.uiLayoutCommand) - spacerItem4 = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - self.uiLayoutRight.addItem(spacerItem4) + self.plainTextEdit.setReadOnly(True) + self.plainTextEdit.setObjectName("plainTextEdit") + self.uiLayoutRight.addWidget(self.plainTextEdit) + spacerItem2 = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + self.uiLayoutRight.addItem(spacerItem2) self.uiLine = QtWidgets.QFrame(update) self.uiLine.setFrameShape(QtWidgets.QFrame.HLine) self.uiLine.setFrameShadow(QtWidgets.QFrame.Sunken) @@ -87,8 +80,8 @@ def setupUi(self, update): self.uiLayoutRight.addWidget(self.uiLine) self.uiLayoutButton = QtWidgets.QHBoxLayout() self.uiLayoutButton.setObjectName("uiLayoutButton") - spacerItem5 = QtWidgets.QSpacerItem(1, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.uiLayoutButton.addItem(spacerItem5) + spacerItem3 = QtWidgets.QSpacerItem(1, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.uiLayoutButton.addItem(spacerItem3) self.uiPushButtonOK = QtWidgets.QPushButton(update) self.uiPushButtonOK.setObjectName("uiPushButtonOK") self.uiLayoutButton.addWidget(self.uiPushButtonOK) @@ -104,8 +97,9 @@ def retranslateUi(self, update): _translate = QtCore.QCoreApplication.translate update.setWindowTitle(_translate("update", "Update Notice")) self.uiLabelHeader.setText(_translate("update", "Update Available!")) - self.uiLabelFooter.setText(_translate("update", "To update, close IBL Rig Wizard and run the following command within the iblrigv8 Python environment:")) - self.uiLineEditCommand.setText(_translate("update", "upgrade_iblrig")) + self.uiLabelFooter.setText(_translate("update", "To update, close IBL Rig Wizard and run the following commands within the iblrigv8 Python environment:")) + self.plainTextEdit.setPlainText(_translate("update", "git pull\n" +"pip install --upgrade -e .")) self.uiPushButtonOK.setText(_translate("update", "OK")) from iblrig.gui import resources_rc diff --git a/iblrig/gui/ui_update.ui b/iblrig/gui/ui_update.ui index 572a38297..a93d84d15 100644 --- a/iblrig/gui/ui_update.ui +++ b/iblrig/gui/ui_update.ui @@ -77,6 +77,12 @@ + + + 0 + 0 + + Qt::ScrollBarAlwaysOn @@ -100,7 +106,7 @@ - To update, close IBL Rig Wizard and run the following command within the iblrigv8 Python environment: + To update, close IBL Rig Wizard and run the following commands within the iblrigv8 Python environment: Qt::AlignJustify|Qt::AlignVCenter @@ -127,54 +133,25 @@ - - - - - Qt::Horizontal - - - - 1 - 20 - - - - - - - - background-color: rgb(1, 36, 86); + + + + 16777215 + 37 + + + + background-color: rgb(1, 36, 86); color: rgb(255, 255, 255); - - - upgrade_iblrig - - - false - - - Qt::AlignCenter - - - true - - - - - - - Qt::Horizontal - - - - 1 - 20 - - - - - + + + true + + + git pull +pip install --upgrade -e . + + From eda9ca266812cec29e2c7e0faf786b29b91b6701 Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Fri, 7 Jun 2024 17:02:50 +0100 Subject: [PATCH 3/3] ensure that SerialSingleton doesn't misbehave --- CHANGELOG.md | 1 + iblrig/hardware_validation.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc8b19135..0b9ef9baf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Changelog 8.19.4 ------ * hotfix: fix validation for Alyx when no Alyx URL has been set +* hotfix: fix validation for Bpod HiFi module * adapted update instructions in update notification & documentation 8.19.3 diff --git a/iblrig/hardware_validation.py b/iblrig/hardware_validation.py index 51c603d28..38400bb46 100644 --- a/iblrig/hardware_validation.py +++ b/iblrig/hardware_validation.py @@ -199,6 +199,9 @@ def _run(self): ser.flush() if not (passed := bool(re.search(regex_pattern, return_string))): break + ser.__del__() + del ser + if passed: yield Result(Status.PASS, f'Serial device positively identified as {self.name}') return True