Skip to content

Commit da5ec54

Browse files
authored
Merge pull request #826 from int-brain-lab/iblrigv8dev
8.28.2
2 parents cbe2827 + 77302a3 commit da5ec54

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

.github/workflows/main.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ jobs:
4343
- name: Install audio library (Ubuntu only)
4444
if: matrix.os == 'ubuntu-latest'
4545
run: sudo apt-get install -y libportaudio2
46-
- name: Set environment variable
47-
run: echo "GITHUB_ACTIONS=true" >> $GITHUB_ENV
46+
- uses: pyvista/setup-headless-display-action@v3
47+
with:
48+
qt: true
49+
pyvista: false
4850
- name: iblrig unit tests
4951
run: pdm run pytest
5052
- name: coveralls.io

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
8.28.2
5+
------
6+
* fixed: ensure that reward amount shown in online plots stays visible at all times
7+
48
8.28.1
59
------
610
* fixed: online plots showed incorrect reward amount

iblrig/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# 5) git tag the release in accordance to the version number below (after merge!)
77
# >>> git tag 8.15.6
88
# >>> git push origin --tags
9-
__version__ = '8.28.1'
9+
__version__ = '8.28.2'

iblrig/gui/online_plots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def __init__(self, *args, barColor: Any = 0.2, textColor: Any = 1.0, textFormat:
146146
def setValue(self, value: float):
147147
self._barGraphItem.setOpts(height=value)
148148
self._textItem.setText(self._textFormat.format(value))
149-
self._textItem.setY(value)
149+
self._textItem.setY(min(self.plotItem.viewRange()[1][1], value))
150150
self._setTextAnchor()
151151

152152
def resizeEvent(self, ev):

iblrig/test/test_online_plots.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os
21
import zipfile
32
from pathlib import Path
43
from tempfile import TemporaryDirectory
@@ -10,10 +9,6 @@
109
zip_jsonable = Path(__file__).parent.joinpath('fixtures', 'online_plots_biased_iblrigv7.zip')
1110

1211

13-
@pytest.mark.skipif(
14-
os.getenv('GITHUB_ACTIONS') == 'true' and os.name == 'posix' and os.uname().sysname == 'Linux',
15-
reason='Skipping test on GitHub Actions Ubuntu runners',
16-
)
1712
class TestOnlinePlots:
1813
@pytest.fixture
1914
def task_file(self):
@@ -79,11 +74,11 @@ def test_colors(self, task_file, qtbot):
7974
model._n_trials_engaged = 401
8075
model.compute_end_session_criteria()
8176
with qtbot.assertNotEmitted(model.titleColorChanged):
82-
model._trial_data['response_time'][-20:] = 5
77+
model._trial_data.loc[model._trial_data.index[-20:], 'response_time'] = 5
8378
model.compute_end_session_criteria()
8479
assert model.titleColor == op.Colors.TRANSPARENT
8580
with qtbot.waitSignal(model.titleColorChanged, timeout=5):
86-
model._trial_data['response_time'][-20:] = 5.1
81+
model._trial_data.loc[model._trial_data.index[-20:], 'response_time'] = 6
8782
model.compute_end_session_criteria()
8883
assert model.titleColor == op.Colors.YELLOW
8984

0 commit comments

Comments
 (0)