Skip to content

Commit 98e7074

Browse files
authored
upgrade psychopy (#396)
* upgrade psychopy * update the pull request template to remove ticket link update mac builds (failing lsl) * gui fixes and small fix to evidence eval for EEG
1 parent 877af5b commit 98e7074

File tree

6 files changed

+17
-20
lines changed

6 files changed

+17
-20
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Overview
22

3-
Define what you did...
4-
5-
## Ticket
6-
7-
Link a pivotal ticket here
3+
Define what you did... why is this change required? What problem does it solve?
84

95
## Contributions
106

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ jobs:
115115
run: |
116116
python -m pip install --upgrade pip
117117
brew update
118+
brew uninstall cmake
118119
sh scripts/shell/m2chip_install.sh
119120
brew install labstreaminglayer/tap/lsl
120-
pip install psychopy --no-deps
121121
make install
122122
- name: install dependencies
123123
run: |

bcipy/gui/BCInterface.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ def _build_action_buttons(self) -> None:
172172
(self.ui_config.btn_width * 2) + 20
173173
self.add_button(
174174
message='Train',
175-
position=(btn_auc_x, 450),
176-
size=(self.ui_config.btn_width, self.ui_config.btn_height),
175+
position=[btn_auc_x, 450],
176+
size=[self.ui_config.btn_width, self.ui_config.btn_height],
177177
background_color='LightSeaGreen',
178178
text_color='black',
179179
font_family=self.ui_config.font,
@@ -182,7 +182,7 @@ def _build_action_buttons(self) -> None:
182182
def _build_start_button(self) -> None:
183183
"""Build the Start Session button."""
184184
btn_start_width = self.ui_config.btn_width * 2 + 10
185-
btn_start_x = self.width - (self.ui_config.padding + btn_start_width)
185+
btn_start_x = self._width - (self.ui_config.padding + btn_start_width)
186186
self.add_button(
187187
message='Start Session',
188188
position=[btn_start_x, 440],
@@ -196,7 +196,7 @@ def _build_create_experiment_button(self) -> None:
196196
"""Build the Create Experiment button."""
197197
self.add_button(
198198
message='+',
199-
position=[self.width - self.ui_config.padding - 200, 260],
199+
position=[self._width - self.ui_config.padding - 200, 260],
200200
size=[35, self.ui_config.btn_height - 10],
201201
background_color='green',
202202
action=self.create_experiment,
@@ -301,7 +301,7 @@ def build_images(self) -> None:
301301
# NEU logo
302302
self.add_image(
303303
path=f'{STATIC_IMAGES_PATH}/gui/neu.png',
304-
position=[self.width - self.ui_config.padding - 110, 0],
304+
position=[self._width - self.ui_config.padding - 110, 0],
305305
size=100)
306306

307307
def build_assets(self) -> None:
@@ -517,7 +517,7 @@ def load_experiments(self) -> List[str]:
517517
Returns:
518518
List[str]: List of experiment names.
519519
"""
520-
return load_experiments().keys()
520+
return list(load_experiments().keys())
521521

522522
def start_experiment(self) -> None:
523523
"""Start an experiment session."""

bcipy/task/control/evidence.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def __init__(
6161
self.symbol_set = symbol_set
6262
self.signal_model = signal_model
6363
self.device_spec = device_spec
64+
self.parameters = parameters
6465

6566
@property
6667
def consumes(self) -> ContentType:
@@ -80,7 +81,7 @@ def produces(self) -> EvidenceType:
8081
"""
8182
raise NotImplementedError()
8283

83-
def evaluate(self, **kwargs: Any) -> np.ndarray:
84+
def evaluate(self, *args: Any, **kwargs: Any) -> np.ndarray:
8485
"""Evaluate the evidence from raw data.
8586
8687
Args:
@@ -167,7 +168,8 @@ def evaluate(
167168
times: List[float],
168169
target_info: List[str],
169170
window_length: float,
170-
*args: Any) -> np.ndarray:
171+
*args: Any,
172+
**kwargs: Any) -> np.ndarray:
171173
"""Evaluate EEG evidence.
172174
173175
Args:
@@ -270,10 +272,9 @@ def evaluate(
270272
raw_data: np.ndarray,
271273
symbols: List[str],
272274
times: List[float],
273-
target_info: List[str],
274-
window_length: float,
275275
flash_time: float,
276-
stim_length: float) -> np.ndarray:
276+
*args: Any,
277+
**kwargs: Any) -> np.ndarray:
277278
"""Evaluate gaze evidence.
278279
279280
Args:
@@ -382,7 +383,7 @@ def preprocess(
382383
# pylint: disable=arguments-differ
383384
def evaluate(self, raw_data: np.ndarray, symbols: List[str],
384385
times: List[float], target_info: List[str],
385-
window_length: float) -> np.ndarray:
386+
window_length: float, *args: Any, **kwargs: Any) -> np.ndarray:
386387
"""Evaluate the evidence.
387388
388389
Parameters

bcipy/task/paradigm/rsvp/copy_phrase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ def evaluate_evidence(self) -> Decision:
648648
return Decision(decision_made, selection, spelled_text, new_sti)
649649

650650
def add_evidence(
651-
self, stim_times: List[List], proceed: bool = True
651+
self, stim_times: List[Tuple], proceed: bool = True
652652
) -> List[EvidenceType]:
653653
"""Add all evidence used to make a decision.
654654

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies = [
3434
"pybv==0.7.5",
3535
"pyo==1.0.5",
3636
"pyglet<=1.5.27,>=1.4",
37-
"PsychoPy==2024.2.1",
37+
"PsychoPy==2025.1.1",
3838
"openpyxl==3.1.2",
3939
"numpy==1.24.4",
4040
"sounddevice==0.4.4",

0 commit comments

Comments
 (0)