def reset_config(): # note - can't set a new user_config, because it would be a local variable # instead, we update it with the defaults # this only works if we aren't adding anything extra to the user_config user_config.update(default_config) try: assert (user_config == default_config) except: print DataFrame( dict(config=Series(user_config), default=Series(default_config))) raise
def reset_config(): # note - can't set a new user_config, because it would be a local variable # instead, we update it with the defaults # this only works if we aren't adding anything extra to the user_config user_config.update(default_config) try: assert(user_config == default_config) except: print DataFrame(dict( config=Series(user_config), default=Series(default_config))) raise
def run_case(name, basedir=this_directory, **kwds): ''' a programatic way to do (nearly) the same thing as calling the minpower script (nearly: because prepends basedir to the directory name you are solving) ''' # reset user_config to defaults first user_config.update(default_config) assert (user_config == default_config) user_config.breakpoints = 3 # for speedier testing user_config.update(kwds) sln = solve_dir(os.path.join(basedir, name)) basic_checks(sln) return sln
def run_case(name, basedir=this_directory, **kwds): ''' a programatic way to do (nearly) the same thing as calling the minpower script (nearly: because prepends basedir to the directory name you are solving) ''' # reset user_config to defaults first user_config.update(default_config) assert(user_config == default_config) user_config.breakpoints = 3 # for speedier testing user_config.update(kwds) sln = solve_dir(os.path.join(basedir, name)) basic_checks(sln) return sln