def create_recipe_plan(self): """Creates a recipe object which has the ingredients and dependency information """ import inspect #'GRJ DEBUG: %s.%s' % (self.__class__.__name__, inspect.stack()[0][3]) [how_to_update, parents_to_check, how_to_run] = ru.read_recipe(self.recipe_file) recipe_obj = RecipePlan(self.work_dir) ingredlist = how_to_run.keys() for ingred in ingredlist: self.update_top_meta_for_ingred(ingred) ingredtype = how_to_run[ingred] recipe_obj.ingredients[ingred]="I" #set all to initialized recipe_obj.ingred_input_options[ingred] = self.get_my_ingredient_options(ingred, ingredtype) if not os.path.isdir(os.path.join(self.work_dir, ingred)): self.create_ingredient(recipe_obj.ingred_input_options[ingred]) recipe_obj.write_methods[ingred] = self.get_method_list(ingredtype, "mast_write_method") recipe_obj.ready_methods[ingred] = self.get_method_list(ingredtype, "mast_ready_method") recipe_obj.run_methods[ingred] = self.get_method_list(ingredtype, "mast_run_method") recipe_obj.complete_methods[ingred] = self.get_method_list(ingredtype, "mast_complete_method") recipe_obj.update_methods[ingred] = dict() for ichild in how_to_update[ingred].keys(): updingredtype = how_to_update[ingred][ichild] recipe_obj.update_methods[ingred][ichild] = self.get_method_list(updingredtype, "mast_update_children_method") recipe_obj.parents_to_check = dict(parents_to_check) recipe_obj.summary_options = self.get_summary_options() return recipe_obj
def create_recipe_plan(self): """Creates a recipe object which has the ingredients and dependency information """ import inspect #'GRJ DEBUG: %s.%s' % (self.__class__.__name__, inspect.stack()[0][3]) [how_to_update, parents_to_check, how_to_run] = ru.read_recipe(self.recipe_file) recipe_obj = RecipePlan(self.work_dir) ingredlist = how_to_run.keys() for ingred in ingredlist: self.update_top_meta_for_ingred(ingred) ingredtype = how_to_run[ingred] recipe_obj.ingredients[ingred] = "I" #set all to initialized recipe_obj.ingred_input_options[ ingred] = self.get_my_ingredient_options(ingred, ingredtype) if not os.path.isdir(os.path.join(self.work_dir, ingred)): self.create_ingredient(recipe_obj.ingred_input_options[ingred]) recipe_obj.write_methods[ingred] = self.get_method_list( ingredtype, "mast_write_method") recipe_obj.ready_methods[ingred] = self.get_method_list( ingredtype, "mast_ready_method") recipe_obj.run_methods[ingred] = self.get_method_list( ingredtype, "mast_run_method") recipe_obj.complete_methods[ingred] = self.get_method_list( ingredtype, "mast_complete_method") recipe_obj.update_methods[ingred] = dict() for ichild in how_to_update[ingred].keys(): updingredtype = how_to_update[ingred][ichild] recipe_obj.update_methods[ingred][ ichild] = self.get_method_list( updingredtype, "mast_update_children_method") recipe_obj.parents_to_check = dict(parents_to_check) recipe_obj.summary_options = self.get_summary_options() return recipe_obj