def ensure_nauts(): """ CommandLine: python dev.py -t nauts """ import ibeis ibeis.ensure_nauts()
def reset_testdbs(**kwargs): # Step 0) Parse Args default_args = {'reset_' + key: False for key in six.iterkeys(TEST_DBNAMES_MAP)} default_args['reset_all'] = False default_args.update(kwargs) argdict = ut.parse_dict_from_argv(default_args) if not any(list(six.itervalues(argdict))): # Default behavior is to reset the small dbs argdict['reset_testdb0'] = True argdict['reset_testdb1'] = True argdict['reset_testdb_guiall'] = True # Step 1) Delete DBs to be Reset for key, dbname in six.iteritems(TEST_DBNAMES_MAP): if argdict.get('reset_' + key, False) or argdict['reset_all']: delete_dbdir(dbname) # Step 3) Ensure DBs that dont exist ensure_smaller_testingdbs() workdir = ibeis.sysres.get_workdir() if not ut.checkpath(join(workdir, 'PZ_MTEST'), verbose=True): ibeis.ensure_pz_mtest() if not ut.checkpath(join(workdir, 'NAUT_test'), verbose=True): ibeis.ensure_nauts() if not ut.checkpath(join(workdir, 'testdb2'), verbose=True): ibeis.init.sysres.ensure_testdb2() # Step 4) testdb1 becomes the main database workdir = ibeis.sysres.get_workdir() TESTDB1 = join(workdir, 'testdb1') sysres.set_default_dbdir(TESTDB1)
def ensure_testing_data(): from ibeis.tests import reset_testdbs print('Making sure test data exists') import ibeis from os.path import join ut.change_term_title('ENSURE IBEIS TETSDATA') reset_testdbs.reset_testdbs() workdir = ibeis.get_workdir() if not ut.checkpath(join(workdir, 'PZ_MTEST')): ibeis.ensure_pz_mtest() if not ut.checkpath(join(workdir, 'NAUT_test')): ibeis.ensure_nauts() if not ut.checkpath(join(workdir, 'wd_peter2')): ibeis.ensure_wilddogs()
def reset_testdbs(**kwargs): # Step 0) Parse Args import ibeis ibeis.ENABLE_WILDBOOK_SIGNAL = False default_args = { 'reset_' + key: False for key in six.iterkeys(TEST_DBNAMES_MAP) } default_args['reset_all'] = False default_args.update(kwargs) argdict = ut.parse_dict_from_argv(default_args) if not any(list(six.itervalues(argdict))): # Default behavior is to reset the small dbs argdict['reset_testdb0'] = True argdict['reset_testdb1'] = True argdict['reset_testdb_guiall'] = True # Step 1) Delete DBs to be Reset for key, dbname in six.iteritems(TEST_DBNAMES_MAP): if argdict.get('reset_' + key, False) or argdict['reset_all']: delete_dbdir(dbname) # Step 3) Ensure DBs that dont exist ensure_smaller_testingdbs() workdir = ibeis.sysres.get_workdir() if not ut.checkpath(join(workdir, 'PZ_MTEST'), verbose=True): ibeis.ensure_pz_mtest() if not ut.checkpath(join(workdir, 'NAUT_test'), verbose=True): ibeis.ensure_nauts() if not ut.checkpath(join(workdir, 'wd_peter2'), verbose=True): ibeis.ensure_wilddogs() if not ut.checkpath(join(workdir, 'testdb2'), verbose=True): ibeis.init.sysres.ensure_testdb2() # Step 4) testdb1 becomes the main database workdir = ibeis.sysres.get_workdir() TESTDB1 = join(workdir, 'testdb1') sysres.set_default_dbdir(TESTDB1)