oneibl.registration

class oneibl.registration.RegistrationClient(one=None)

Object that keeps the ONE instance and provides method to create sessions and register data.

create_session(session_path)
create_sessions(root_data_folder, glob_pattern='**/create_me.flag', dry=False)

Create sessions looking recursively for flag files

Parameters:
  • root_data_folder – folder to look for create_me.flag
  • dry – bool. Dry run if True
  • glob_pattern – bool. Dry run if True
Returns:

None

register_session(ses_path, file_list=True)

Register session in Alyx

Parameters:
  • ses_path – path to the session
  • file_list – bool. Set to False will only create the session and skip registration
  • repository_name – Optional, repository on which to register the data
Returns:

Status string on error

register_sync(root_data_folder, dry=False)

Register sessions looking recursively for flag files

Parameters:
  • root_data_folder – folder to look for register_me.flag
  • dry – bool. Dry run if True
Returns:

oneibl.registration.register_dataset(file_list, one=None, created_by=None, repository=None, server_only=False, versions=False, dry=False, max_md5_size=None)

Registers a set of files belonging to a session only on the server :param file_list: (list of pathlib.Path or pathlib.Path) :param one: optional (oneibl.ONE), current one object, will create an instance if not provided :param created_by: (string) name of user in Alyx (defaults to ‘root’) :param repository: optional: (string) name of the repository in Alyx :param server_only: optional: (bool) if True only creates on the Flatiron (defaults to False) :param versions: optional (list of strings): versions tags (defaults to ibllib version) :param dry: (bool) False by default :param verbose: (bool) logs :param max_md5_size: (int) maximum file in bytes to compute md5 sum (always compute if Npne) defaults to None :return:

oneibl.registration.register_session_raw_data(session_path, one=None, overwrite=False, dry=False, **kwargs)

Registers all files corresponding to raw data files to Alyx. It will select files that match Alyx registration patterns. :param session_path: :param one: one instance to work with :param overwrite: (False) if set to True, will patch the datasets. It will take very long. If set to False (default) will skip all already registered data. :param dry: do not register files, returns the list of files to be registered :return: list of file to register :return: Alyx response: dictionary of registered files