Beispiel #1
0
 def act_on_options(self, options):
     super(ROCAction, self).act_on_options(self, options)
     config.get_config().overwrite_flag = self.options.overwrite_flag
     if self.options.lifestage is None:
         self.options.lifestage = "all"
     if self.options.sites_vector is None:
         self.log.error("No sites vector provided.")
         sys.exit(mdig.mdig_exit_codes["cmdline_error"])
     if self.options.area_mask is None:
         self.log.error("No area mask specified.")
         sys.exit(mdig.mdig_exit_codes["cmdline_error"])
     if self.options.output_dir is not None:
         if not os.path.isdir(options.output_dir):
             self.log.info(
                 "Directory %s doesn't exist, attemping to" + " create\n",
                 options.output_dir)
             utils.make_path(options.output_dir)
     else:
         self.options.output_dir = "."
     if self.options.model_tags is not None:
         tags = self.options.model_tags.split(",")
         if len(tags) != len(self.model_names):
             self.log.error("Number of tags given not the same as number "+\
                     " of models.")
             sys.exit(mdig.mdig_exit_codes["cmdline_error"])
         self.options.model_tags = tags
Beispiel #2
0
 def act_on_options(self,options):
     super(ROCAction, self).act_on_options(self, options)
     config.get_config().overwrite_flag = self.options.overwrite_flag
     if self.options.lifestage is None:
         self.options.lifestage = "all"
     if self.options.sites_vector is None:
         self.log.error("No sites vector provided.")
         sys.exit(mdig.mdig_exit_codes["cmdline_error"])
     if self.options.area_mask is None:
         self.log.error("No area mask specified.")
         sys.exit(mdig.mdig_exit_codes["cmdline_error"])
     if self.options.output_dir is not None:
         if not os.path.isdir(options.output_dir):
             self.log.info("Directory %s doesn't exist, attemping to" +
                     " create\n",options.output_dir)
             utils.make_path(options.output_dir)
     else:
         self.options.output_dir = "."
     if self.options.model_tags is not None:
         tags = self.options.model_tags.split(",")
         if len(tags) != len(self.model_names):
             self.log.error("Number of tags given not the same as number "+\
                     " of models.")
             sys.exit(mdig.mdig_exit_codes["cmdline_error"])
         self.options.model_tags = tags
Beispiel #3
0
 def act_on_options(self, options):
     super(RunAction, self).act_on_options(options)
     c = config.get_config()
     if options.output_dir is not None:
         if not os.path.isdir(options.output_dir):
             self.log.info("Directory %s doesn't exist, attemping to" +
                     " create\n",options.output_dir)
             c.output_dir = \
                 utils.make_path(options.output_dir)
         else:
             c.output_dir = options.output_dir
     c.overwrite_flag = self.options.overwrite_flag
     c.remove_null = self.options.remove_null