From 9801a3e94d1ee597ed5f816c96922cf58ec0c331 Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Fri, 18 Oct 2024 17:11:57 +0100 Subject: [PATCH] fix CI --- iblrig/base_choice_world.py | 4 ---- iblrig/base_tasks.py | 2 +- iblrig/test/test_hardware_mixins.py | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/iblrig/base_choice_world.py b/iblrig/base_choice_world.py index e45f86c8..a3e4ab34 100644 --- a/iblrig/base_choice_world.py +++ b/iblrig/base_choice_world.py @@ -479,10 +479,6 @@ def next_trial(self): def default_reward_amount(self): return self.task_params.REWARD_AMOUNT_UL - @property - def stimulus_gain(self) -> float: - return self.task_params.STIM_GAIN - def draw_next_trial_info(self, pleft=0.5, **kwargs): """Draw next trial variables. diff --git a/iblrig/base_tasks.py b/iblrig/base_tasks.py index 1d2215c9..07d5e43c 100644 --- a/iblrig/base_tasks.py +++ b/iblrig/base_tasks.py @@ -1001,7 +1001,7 @@ class RotaryEncoderMixin(BaseSession, HasBpod): @property def stimulus_gain(self) -> float: - return self.task_params.STIM_GAIN() + return self.task_params.STIM_GAIN def init_mixin_rotary_encoder(self): thresholds_deg = self.task_params.STIM_POSITIONS + self.task_params.QUIESCENCE_THRESHOLDS diff --git a/iblrig/test/test_hardware_mixins.py b/iblrig/test/test_hardware_mixins.py index 1fcfae39..f08e2001 100644 --- a/iblrig/test/test_hardware_mixins.py +++ b/iblrig/test/test_hardware_mixins.py @@ -101,8 +101,8 @@ def test_rotary_encoder_mixin(self): """ Instantiates a bare session with the rotary encoder mixin """ - session = self.session - RotaryEncoderMixin.init_mixin_rotary_encoder(session) + RotaryEncoderSession = type('RotaryEncoderSession', (EmptyHardwareSession, RotaryEncoderMixin), {}) # noqa: N806 + session = RotaryEncoderSession(task_parameter_file=ChoiceWorldSession.base_parameters_file, **TASK_KWARGS) assert session.device_rotary_encoder.ENCODER_EVENTS == [ 'RotaryEncoder1_1', 'RotaryEncoder1_2',