Skip to content

Commit f5186d1

Browse files
authored
Merge pull request #594 from int-brain-lab/fix_passive_ntrials
Fix passive ntrials
2 parents 761325b + 062a828 commit f5186d1

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

ibllib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33
import warnings
44

5-
__version__ = '2.21.2'
5+
__version__ = '2.21.3'
66
warnings.filterwarnings('always', category=DeprecationWarning, module='ibllib')
77

88
# if this becomes a full-blown library we should let the logging configuration to the discretion of the dev

ibllib/oneibl/registration.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ def register_session(self, ses_path, file_list=True, projects=None, procedures=N
261261
# create associated water administration if not found
262262
if not session['wateradmin_session_related'] and any(task_data):
263263
for md, d in zip(settings, task_data):
264+
if d is None:
265+
continue
264266
_, _end_time = _get_session_times(ses_path, md, d)
265267
user = md.get('PYBPOD_CREATOR')
266268
user = user[0] if user[0] in users else self.one.alyx.user
@@ -426,6 +428,8 @@ def _get_session_performance(md, ses_data):
426428
else:
427429
assert isinstance(ses_data, (list, tuple)) and len(ses_data) == len(md)
428430

431+
# For now just remove missing session data, long run move this function into extractors
432+
ses_data = [sd for sd in ses_data if sd]
429433
n_trials = [x[-1]['trial_num'] for x in ses_data]
430434
# checks that the number of actual trials and labeled number of trials check out
431435
assert all(len(x) == n for x, n in zip(ses_data, n_trials))

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ boto3
22
click>=7.0.0
33
colorlog>=4.0.2
44
flake8>=3.7.8
5-
globus-sdk==3.2.1
5+
globus-sdk
66
graphviz
77
matplotlib>=3.0.3
88
mtscomp>=1.0.1

0 commit comments

Comments
 (0)