Skip to content

Commit

Permalink
Merge pull request #8 from int-brain-lab/develop
Browse files Browse the repository at this point in the history
v0.4.1
  • Loading branch information
bimac authored Jan 17, 2025
2 parents 91aba92 + e31001e commit 6d18a81
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion iblqt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""A collection of extensions to the Qt framework."""

__version__ = '0.4.0'
__version__ = '0.4.1'
21 changes: 12 additions & 9 deletions iblqt/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 6d18a81

Please sign in to comment.