dax/dax_tools_utils.py
def _set_cluster_default(self, ctype=False):
        """Use the default cluster settings from the cluster type selected.

        :param ctype: True if set to default
        :return: None
        """
        cluster_type = '0'
        while cluster_type not in ['1', '2', '3']:
            cluster_type = input("Which cluster are you using? \
[1.SGE 2.SLURM 3.MOAB] ")
        sys.stdout.write('Warning: You can edit the cluster templates files \
at any time in ~/.dax_templates/\n')

        for option in ['gateway', 'root_job_dir', 'queue_limit', 'results_dir',
                       'max_age', 'launcher_type', 'skip_lastupdate']:
            value = self._prompt('cluster', option)
            self.config_parser.set('cluster', option, value)

        if cluster_type == '1':
            cluster_dict = DEFAULT_SGE_DICT
        elif cluster_type == '2':
            cluster_dict = DEFAULT_SLURM_DICT
        else:
            cluster_dict = DEFAULT_MOAB_DICT

        # Copy the files from the template:
        templates_path = os.path.join(self.config_parser.get('admin',
                                                             'user_home'),
                                      '.dax_templates')
        if not os.path.exists(templates_path):
            os.makedirs(templates_path)
        for option, value in list(cluster_dict.items()):
            if option in OPTIONS_DESCRIPTION and \
               OPTIONS_DESCRIPTION[option]['is_path']:
                file_path = os.path.join(templates_path, option + '.txt')
                with open(file_path, 'w') as fid:
                    fid.writelines(value)
                self.config_parser.set('cluster', option, file_path)
            else:
                self.config_parser.set('cluster', option, value)
Use the default cluster settings from the cluster type selected.

        :param ctype: True if set to default
        :return: None
        
Use the default cluster settings from the cluster type selected.
Use the default cluster settings from the cluster type selected .
def _set_cluster_default(self, ctype=False):
        cluster_type = '0'
        while cluster_type not in ['1', '2', '3']:
            cluster_type = input("Which cluster are you using? \
[1.SGE 2.SLURM 3.MOAB] ")
        sys.stdout.write('Warning: You can edit the cluster templates files \
at any time in ~/.dax_templates/\n')
        for option in ['gateway', 'root_job_dir', 'queue_limit', 'results_dir',
                       'max_age', 'launcher_type', 'skip_lastupdate']:
            value = self._prompt('cluster', option)
            self.config_parser.set('cluster', option, value)
        if cluster_type == '1':
            cluster_dict = DEFAULT_SGE_DICT
        elif cluster_type == '2':
            cluster_dict = DEFAULT_SLURM_DICT
        else:
            cluster_dict = DEFAULT_MOAB_DICT
        templates_path = os.path.join(self.config_parser.get('admin',
                                                             'user_home'),
                                      '.dax_templates')
        if not os.path.exists(templates_path):
            os.makedirs(templates_path)
        for option, value in list(cluster_dict.items()):
            if option in OPTIONS_DESCRIPTION and \
               OPTIONS_DESCRIPTION[option]['is_path']:
                file_path = os.path.join(templates_path, option + '.txt')
                with open(file_path, 'w') as fid:
                    fid.writelines(value)
                self.config_parser.set('cluster', option, file_path)
            else:
                self.config_parser.set('cluster', option, value)
def _set_cluster_default ( self , ctype = False ) : cluster_type = '0' while cluster_type not in [ '1' , '2' , '3' ] : cluster_type = input ( "Which cluster are you using? \
[1.SGE 2.SLURM 3.MOAB] " ) sys . stdout . write ( 'Warning: You can edit the cluster templates files \
at any time in ~/.dax_templates/\n' ) for option in [ 'gateway' , 'root_job_dir' , 'queue_limit' , 'results_dir' , 'max_age' , 'launcher_type' , 'skip_lastupdate' ] : value = self . _prompt ( 'cluster' , option ) self . config_parser . set ( 'cluster' , option , value ) if cluster_type == '1' : cluster_dict = DEFAULT_SGE_DICT elif cluster_type == '2' : cluster_dict = DEFAULT_SLURM_DICT else : cluster_dict = DEFAULT_MOAB_DICT templates_path = os . path . join ( self . config_parser . get ( 'admin' , 'user_home' ) , '.dax_templates' ) if not os . path . exists ( templates_path ) : os . makedirs ( templates_path ) for option , value in list ( cluster_dict . items ( ) ) : if option in OPTIONS_DESCRIPTION and OPTIONS_DESCRIPTION [ option ] [ 'is_path' ] : file_path = os . path . join ( templates_path , option + '.txt' ) with open ( file_path , 'w' ) as fid : fid . writelines ( value ) self . config_parser . set ( 'cluster' , option , file_path ) else : self . config_parser . set ( 'cluster' , option , value )
Use the default cluster settings from the cluster type selected.
Use the default cluster settings from the cluster type selected .
"""Use the default cluster settings from the cluster type selected.

        :param ctype: True if set to default
        :return: None
        """ # Copy the files from the template:
None
self
ctype
True if set to default
True if set to default