def test_sync_extract(self):
        session_path = self.session_path
        dry = False
        ibllib.io.flags.create_other_flags(session_path,
                                           'extract_ephys.flag',
                                           force=True)
        iblrig_pipeline.extract_ephys(session_path, dry=dry)

        one = ONE(base_url='https://test.alyx.internationalbrainlab.org',
                  username='******',
                  password='******')
        iblrig_pipeline.register(session_path, one=one)
Exemple #2
0
def rerun_register(ses_path, drange, dry=True):
    # compute the date range including both bounds
    files_error, files_error_date = _order_glob_by_session_date(
        ses_path.rglob('register_me.error'))
    for file_error, date in zip(files_error, files_error_date):
        if not (date >= drange[0] and (date <= drange[1])):
            continue
        print(file_error)
        if dry:
            continue
        file_error.unlink()
        flags.create_register_flags(file_error.parent, force=True)
        pipes.register(file_error.parent)
Exemple #3
0
                        default='1999-12-12',
                        type=str)
    parser.add_argument('--last',
                        help='yyyy-mm-dd date',
                        required=False,
                        default='2050-12-12',
                        type=str)
    args = parser.parse_args(
    )  # returns data from the options specified (echo)

    if args.dry and args.dry.lower() == 'false':
        args.dry = False
    assert (Path(args.folder).exists())

    ses_path = Path(args.folder)

    # compute the date range including both bounds
    files_error, files_error_date = _order_glob_by_session_date(
        ses_path.rglob('register_me.error'))
    drange = [parse(args.first), parse(args.last)]

    for file_error, date in zip(files_error, files_error_date):
        if not (date >= drange[0] and (date <= drange[1])):
            continue
        print(file_error)
        if args.dry:
            continue
        file_error.unlink()
        flags.create_register_flags(file_error.parent, force=True)
        register(file_error.parent)
Exemple #4
0
 def _registration(self):
     iblrig_pipeline.register(self.server_folder, one=self.one)
     # Check for deletion of register_me.flag
     rflags = list(self.server_folder.rglob('register_me.flag'))
     self.assertTrue(rflags == [])
Exemple #5
0
    parser = argparse.ArgumentParser(description="Description of your program")
    parser.add_argument("action", help="Action: " + ",".join(ALLOWED_ACTIONS))
    parser.add_argument("folder", help="A Folder containing a session")
    parser.add_argument("--dry",
                        help="Dry Run",
                        required=False,
                        default=False,
                        type=str)
    parser.add_argument(
        "--count",
        help="Max number of sessions to run this on",
        required=False,
        default=False,
        type=int,
    )
    args = parser.parse_args(
    )  # returns data from the options specified (echo)
    if args.dry and args.dry.lower() == "false":
        args.dry = False
    assert Path(args.folder).exists()
    if args.action == "extract":
        extract(args.folder, dry=args.dry)
    elif args.action == "register":
        register(args.folder, dry=args.dry)
    elif args.action == "create":
        create(args.folder, dry=args.dry)
    elif args.action == "compress_video":
        compress_video(args.folder, dry=args.dry, max_sessions=args.count)
    else:
        logger.error("Allowed actions are: " + ", ".join(ALLOWED_ACTIONS))
 def test_sync_extract(self):
     session_path = self.session_path
     ibllib.io.flags.create_extract_flags(session_path, force=True)
     extract_session.bulk(self.session_path)
     one = ONE(base_url='https://test.alyx.internationalbrainlab.org')
     iblrig_pipeline.register(session_path, one=one)