Skip to content

Commit

Permalink
Patch 52 (#54)
Browse files Browse the repository at this point in the history
* fix types for EcephysSession

* forgot stim_epochs

* fixes test
  • Loading branch information
mekhlakapoor authored Oct 24, 2024
1 parent 64bd12b commit bfe9376
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/aind_slims_api/operations/ecephys_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SlimsRewardDeliveryInfo(BaseModel):
"""Pydantic Model to store Reward Delivery Info"""

reward_delivery: Optional[SlimsRewardDeliveryRdrc] = None
reward_spouts: Optional[SlimsRewardSpoutsRdrc] = []
reward_spouts: Optional[SlimsRewardSpoutsRdrc] = None


class SlimsStreamModule(SlimsDomeModuleRdrc):
Expand Down Expand Up @@ -162,7 +162,7 @@ def _process_single_step(self, group_run_step, session_run_step) -> EcephysSessi
session_result=session,
streams=streams or None,
reward_delivery=reward_delivery,
stimulus_epochs=stimulus_epochs or None,
stimulus_epochs=stimulus_epochs or [],
)

def process_session_steps(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_operations/test_ecephys_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_fetch_ecephys_sessions_success(self):
self.assertEqual(len(ecephys_session.streams), 1)
self.assertEqual(ecephys_session.streams[0].daq_names, ["DAQ1", "DAQ2"])
self.assertEqual(len(ecephys_session.streams[0].stream_modules), 2)
self.assertIsNone(ecephys_session.stimulus_epochs)
self.assertEqual(ecephys_session.stimulus_epochs, [])

def test_fetch_ecephys_sessions_handle_exception(self):
"""Tests that exception is handled as expected"""
Expand Down

0 comments on commit bfe9376

Please sign in to comment.