From 88c7b8ef10063897fab1bcda19d43bb3653ae4e3 Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Fri, 17 Jan 2025 18:50:35 +0000 Subject: [PATCH 1/3] fix documentation - again --- .github/workflows/documentation.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index baaa1ab..c1035bf 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -24,9 +24,7 @@ jobs: - name: Install dependencies run: pdm sync -dG doc - name: Install PyQt5 - run: pip install PyQt5 - - name: Install GraphViz - run: sudo apt-get install -y graphviz + run: pdm run pip install PyQt5 - name: Sphinx build run: pdm run sphinx-build docs/source docs/build - uses: peaceiris/actions-gh-pages@v4 From 06eece80e052a0176894260320c7a7ab7eb3dc9c Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Fri, 17 Jan 2025 19:06:52 +0000 Subject: [PATCH 2/3] fix handling of authentication issues during rest query --- iblqt/core.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/iblqt/core.py b/iblqt/core.py index cadc584..26ed267 100644 --- a/iblqt/core.py +++ b/iblqt/core.py @@ -730,22 +730,25 @@ def rest(self, *args, **kwargs) -> Any: Any The response received from Alyx. """ - if not self._client.is_logged_in: - QMessageBox.critical( - self._parentWidget, - 'Authentication Error', - 'Cannot complete query without authentication.\nPlease log in to Alyx and try again.', - ) try: - return self._client.rest(*args, **kwargs) + with warnings.catch_warnings(): + warnings.simplefilter('ignore') + return self._client.rest(*args, **kwargs) except HTTPError as e: - self.connectionFailed.emit(e) + if e.errno == 400: + QMessageBox.critical( + self._parentWidget, + 'Error', + 'Cannot perform query without authentication.\n' + 'Please log in to Alyx and try again.', + ) + else: + self.connectionFailed.emit(e) def _onConnectionFailed(self, e: Exception) -> None: if (isinstance(e, ConnectionError) and "Can't connect" in e.args[0]) or ( isinstance(e, HTTPError) and e.errno not in (404, 400) ): - pass QMessageBox.critical( self._parentWidget, 'Connection Error', From e31001e300d8f76f5aa65de5952e736ab7eafa30 Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Fri, 17 Jan 2025 19:09:01 +0000 Subject: [PATCH 3/3] prepare release --- CHANGELOG.md | 7 +++++++ iblqt/__init__.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 286554a..9540628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.4.1] - 2025-01-17 + +### Fixed +- core.QAlyx: fixed handling of authentication issues during rest query + ## [0.4.0] - 2025-01-17 ### Added @@ -81,7 +86,9 @@ _First release._ providing color-mapped numerical data. - widgets.StatefulButton: A QPushButton that maintains an active/inactive state. +[0.4.1]: https://github.com/int-brain-lab/iblqt/releases/tag/v0.4.1 [0.4.0]: https://github.com/int-brain-lab/iblqt/releases/tag/v0.4.0 +[0.3.2]: https://github.com/int-brain-lab/iblqt/releases/tag/v0.3.2 [0.3.1]: https://github.com/int-brain-lab/iblqt/releases/tag/v0.3.1 [0.3.0]: https://github.com/int-brain-lab/iblqt/releases/tag/v0.3.0 [0.2.0]: https://github.com/int-brain-lab/iblqt/releases/tag/v0.2.0 diff --git a/iblqt/__init__.py b/iblqt/__init__.py index 6a6f150..8d32b4f 100644 --- a/iblqt/__init__.py +++ b/iblqt/__init__.py @@ -1,3 +1,3 @@ """A collection of extensions to the Qt framework.""" -__version__ = '0.4.0' +__version__ = '0.4.1'