示例#1
0
文件: alyx.py 项目: k1o0/iblrig
def create_session(session_folder):
    pfile = Path(lib_params.getfile("lib_params"))
    if not pfile.exists():
        oneibl.params.setup_alyx_params()

    flags.create_create_flags(session_folder)
    create(session_folder, dry=False)
 def _create(self):
     iblrig_pipeline.create(self.rig_folder, one=self.one)
     # Check for deletion of create_me.flag
     cflags = list(self.server_folder.rglob('create_me.flag'))
     self.assertTrue(cflags == [])
示例#3
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))
示例#4
0
def main():
    pfile = Path(params.getfile("one_params"))
    if not pfile.exists():
        oneibl.params.setup_alyx_params()

    create(IBLRIG_DATA, dry=False)