Skip to content

Commit

Permalink
Windows CI test fix and Linux Numpy 2.0 test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 committed Nov 8, 2024
1 parent 14fee7d commit f7aecdb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 5 additions & 6 deletions ibllib/io/extractors/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,13 @@ def _times_from_bpod(self):
n_frames = 0
n_out_of_sync = 0
missed_trials = []
for ind in np.arange(ntrials):
for ind in range(ntrials):
# get upgoing and downgoing fronts
pin = np.array(self.bpod_trials[ind]['behavior_data']
['Events timestamps'].get('Port1In'))
pout = np.array(self.bpod_trials[ind]['behavior_data']
['Events timestamps'].get('Port1Out'))
events = self.bpod_trials[ind]['behavior_data']['Events timestamps']
pin = np.array(events.get('Port1In') or [np.nan])
pout = np.array(events.get('Port1Out') or [np.nan])
# some trials at startup may not have the camera working, discard
if np.all(pin) is None:
if np.isnan(pin).all():
missed_trials.append(ind)
continue
# if the trial starts in the middle of a square, discard the first downgoing front
Expand Down
3 changes: 2 additions & 1 deletion ibllib/tests/test_oneibl.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,8 @@ def test_handler(self):
self.assertTrue(all(f.is_symlink for f in linked), 'failed to sym link input files')
self.assertEqual(len(task.input_files), len(linked), 'unexpected number of linked patch files')
# Check all links to root session
self.assertTrue(all(f.resolve().is_relative_to(self.session_path) for f in linked))
session_path = self.session_path.resolve() # NB: GitHub CI uses linked temp dir so we resolve here
self.assertTrue(all(f.resolve().is_relative_to(session_path) for f in linked))
# Check sym link doesn't contain UUID
self.assertTrue(len(linked[0].resolve().stem.split('.')[-1]) == 36, 'source path missing UUID')
self.assertFalse(len(linked[0].stem.split('.')[-1]) == 36, 'symlink contains UUID')
Expand Down

0 comments on commit f7aecdb

Please sign in to comment.