def delete_batch(args, unknownArgs): if args.batch_id and len(unknownArgs) > 0: logger.warning("/!\\ BATCH WARNING /!\\") logger.warning( 'More than one Batch Id/Name are provided. Exiting...\n') exit() AnalyzeHelper.delete_batch(args.batch_id)
def list_batch(args, unknownArgs): id_or_name = None if args.id_or_name and len(unknownArgs) > 0: logger.warning("/!\\ BATCH WARNING /!\\") logger.warning( 'More than one Batch Id/Name are provided. We will ignore both and list all batches in DB!\n' ) else: id_or_name = args.id_or_name AnalyzeHelper.list_batch(id_or_name=id_or_name)
def analyze(args, unknownArgs): # logger.info('Analyzing results...') args.config_name = args.analyzer # prevents need for underlying refactor analyze_manager = AnalyzeHelper.analyze(args, unknownArgs, builtinAnalyzers()) return analyze_manager
def test_one_simulation(self): """ sim_id = 'dd993489-7cdb-e711-80c6-f0921c167864' """ print('1 Simulation.') itemids = ['dd993489-7cdb-e711-80c6-f0921c167864'] # collect all experiments and simulations exp_dict, sim_dict = AnalyzeHelper.collect_experiments_simulations(itemids) self.output(exp_dict, sim_dict) self.assertTrue(isinstance(exp_dict, dict)) self.assertTrue(isinstance(sim_dict, dict)) self.assertEqual(0, len(exp_dict)) self.assertEqual(1, len(sim_dict))
def test_one_experiment_one_simulation_one_suite_2(self): """ suite_id = 'd0993489-7cdb-e711-80c6-f0921c167864' exp_id = '9967a9c1-6fdb-e711-80c6-f0921c167864' # exp not belong to suite sim_id = 'dd993489-7cdb-e711-80c6-f0921c167864' """ print('1 Experiment, 1 Simulation and 1 Suite (exp not belong to suite.)') itemids = ['d0993489-7cdb-e711-80c6-f0921c167864', '9967a9c1-6fdb-e711-80c6-f0921c167864', 'dd993489-7cdb-e711-80c6-f0921c167864' ] # collect all experiments and simulations exp_dict, sim_dict = AnalyzeHelper.collect_experiments_simulations(itemids) self.output(exp_dict, sim_dict) self.assertTrue(isinstance(exp_dict, dict)) self.assertTrue(isinstance(sim_dict, dict)) self.assertEqual(3, len(exp_dict)) self.assertEqual(1, len(sim_dict))
def clear_batch(args, unknownArgs): AnalyzeHelper.clear_batch(id_or_name=args.id_or_name, ask=True)
def clean_batch(args, unknownArgs): AnalyzeHelper.clean_batch(ask=True)
def create_batch(args, unknownArgs): AnalyzeHelper.create_batch(args.batch_name, args.itemids)