Adds processing options to the argument group

    Args:
      argument_group (argparse._ArgumentGroup): argparse argument group.
555699
def AddProcessingOptions(self, argument_group):
    
    argument_helper_names = ['temporary_directory', 'zeromq']
    if self._CanEnforceProcessMemoryLimit():
      argument_helper_names.append('process_resources')
    helpers_manager.ArgumentHelperManager.AddCommandLineArguments(
        argument_group, names=argument_helper_names)

    argument_group.add_argument(
        '--worker-memory-limit', '--worker_memory_limit',
        dest='worker_memory_limit', action='store', type=int,
        metavar='SIZE', help=(
            'Maximum amount of memory (data segment and shared memory) '
            'a worker process is allowed to consume in bytes, where 0 '
            'represents no limit. The default limit is 2147483648 (2 GiB). '
            'If a worker process exceeds this limit is is killed by the main '
            '(foreman) process.'))
84546
def add_arguments(self, parser):
        
        parser.add_argument('--length', default=self.length,
                            type=int, help=_('SECRET_KEY length default=%d' % self.length))

        parser.add_argument('--alphabet', default=self.allowed_chars,
                            type=str, help=_('alphabet to use default=%s' % self.allowed_chars))
372415
def _post_processing(kwargs, skip_translate, invalid):  # pylint: disable=unused-argument
    '''
    
    '''
    # If any defaults were not expicitly passed, add them
    for item in DEFAULTS:
        if item not in kwargs:
            kwargs[item] = DEFAULTS[item]
854575
def add_args(parser, positional=False):
    
    group = parser.add_argument_group("read loading")
    group.add_argument("reads" if positional else "--reads",
        nargs="+", default=[],
        help="Paths to bam files. Any number of paths may be specified.")

    group.add_argument(
        "--read-source-name",
        nargs="+",
        help="Names for each read source. The number of names specified "
        "must match the number of bam files. If not specified, filenames are "
        "used for names.")

    # Add filters
    group = parser.add_argument_group(
        "read filtering",
        "A number of read filters are available. See the pysam "
        "documentation (http://pysam.readthedocs.org/en/latest/api.html) "
        "for details on what these fields mean. When multiple filter "
        "options are specified, reads must match *all* filters.")

    for (name, (kind, message, function)) in READ_FILTERS.items():
        extra = {}
        if kind is bool:
            extra["action"] = "store_true"
            extra["default"] = None
        elif kind is int:
            extra["type"] = int
            extra["metavar"] = "N"
        elif kind is str:
            extra["metavar"] = "STRING"
        group.add_argument("--" + name.replace("_", "-"),
            help=message,
            **extra)
138209
def _add(self, name, *args, **kw):
        
        argname = list(self.argdict)[self._argno]
        if argname != name:
            raise NameError(
                'Setting argument %s, but it should be %s' % (name, argname))
        self._group.add_argument(*args, **kw)
        self.all_arguments.append((args, kw))
        self.names.append(name)
        self._argno += 1
1215468
def add_process(self, tgt, args=None, kwargs=None, name=None):
        '''
        
        '''
        if args is None:
            args = []

        if kwargs is None:
            kwargs = {}

        if salt.utils.platform.is_windows():
            # Need to ensure that 'log_queue' and 'log_queue_level' is
            # correctly transferred to processes that inherit from
            # 'MultiprocessingProcess'.
            if type(MultiprocessingProcess) is type(tgt) and (
                    issubclass(tgt, MultiprocessingProcess)):
                need_log_queue = True
            else:
                need_log_queue = False

            if need_log_queue:
                if 'log_queue' not in kwargs:
                    if hasattr(self, 'log_queue'):
                        kwargs['log_queue'] = self.log_queue
                    else:
                        kwargs['log_queue'] = (
                            salt.log.setup.get_multiprocessing_logging_queue()
                        )
                if 'log_queue_level' not in kwargs:
                    if hasattr(self, 'log_queue_level'):
                        kwargs['log_queue_level'] = self.log_queue_level
                    else:
                        kwargs['log_queue_level'] = (
                            salt.log.setup.get_multiprocessing_logging_level()
                        )

        # create a nicer name for the debug log
        if name is None:
            if isinstance(tgt, types.FunctionType):
                name = '{0}.{1}'.format(
                    tgt.__module__,
                    tgt.__name__,
                )
            else:
                name = '{0}{1}.{2}'.format(
                    tgt.__module__,
                    '.{0}'.format(tgt.__class__) if six.text_type(tgt.__class__) != "<type 'type'>" else '',
                    tgt.__name__,
                )

        if type(multiprocessing.Process) is type(tgt) and issubclass(tgt, multiprocessing.Process):
            process = tgt(*args, **kwargs)
        else:
            process = multiprocessing.Process(target=tgt, args=args, kwargs=kwargs, name=name)

        if isinstance(process, SignalHandlingMultiprocessingProcess):
            with default_signals(signal.SIGINT, signal.SIGTERM):
                process.start()
        else:
            process.start()
        log.debug("Started '%s' with pid %s", name, process.pid)
        self._process_map[process.pid] = {'tgt': tgt,
                                          'args': args,
                                          'kwargs': kwargs,
                                          'Process': process}
        return process
312340
def add_options(cls, parser: OptionManager) -> None:
        
        parser.add_option(
            '--eradicate-aggressive',
            default=False,
            help=(
                'Enables aggressive mode for eradicate; '
                'this may result in false positives'
            ),
            action='store_true',
            type=None,
        )
86775
def add_arguments(self):
        
        if self.parser is None:
            raise TypeError("Parser cannot be None, has create_parser been called?")

        for keys, kwargs in self.args.items():
            if not isinstance(keys, tuple):
                keys = (keys,)
            self.parser.add_argument(*keys, **kwargs)
1015555
def add_argument(self, parser, permissive=False, **override_kwargs):
        
        kwargs = {}
        required = None
        if self.kwargs:
            kwargs = copy.copy(self.kwargs)
            if 'env' in kwargs and 'help' in kwargs:
                kwargs['help'] = "%s (or set %s)" % (kwargs['help'],
                                                     kwargs['env'])
            if permissive:
                required = kwargs.pop('required', None)
            try:
                del kwargs['env']
            except KeyError:
                pass
            try:
                del kwargs['ini_section']
            except KeyError:
                pass

            # allow custom and/or exclusive argument groups
            if kwargs.get('group') or kwargs.get('mutually_exclusive'):
                groupname = kwargs.pop('group', None) or kwargs.get('dest')
                mutually_exclusive = kwargs.pop('mutually_exclusive', None)
                if not groupname:
                    raise NoGroupForOption(
                        "%s requires either 'group' or 'dest'." % self)
                description = kwargs.pop('group_description', None)
                exists = [grp for grp in parser._action_groups
                          if grp.title == groupname]
                if exists:
                    group = exists[0]
                    if description and not group.description:
                        group.description = description
                else:
                    group = parser.add_argument_group(
                        title=groupname, description=description)
                if mutually_exclusive:
                    if not required:
                        required = kwargs.pop('required', None)
                    mutexg_title = '%s mutually-exclusive-group' % groupname
                    exists = [grp for grp in group._mutually_exclusive_groups
                              if grp.title == mutexg_title]
                    if exists:
                        group = exists[0]
                    else:
                        # extend parent group
                        group = group.add_mutually_exclusive_group(
                            required=required)
                        group.title = mutexg_title
                    # if any in the same group are required, then the
                    # mutually exclusive group should be set to required
                    if required and not group.required:
                        group.required = required
                    self._mutexgroup = group
                self._action = group.add_argument(*self.args, **kwargs)
                return

        kwargs.update(override_kwargs)
        self._action = parser.add_argument(*self.args, **kwargs)
137902
def add_option(self, group):
        
        group.add_argument(
            "--{0}".format(self.option), action="store_true", help=self.name)
1200424
def add_arguments(parser):
    
    parser.description = 'Triple re-ontologization'
    parser.add_argument('-i', '--input-file', type=argparse.FileType('r'), dest='input_file')
    parser.add_argument('--input-type', action='store', dest='input_type', default='nt')
    parser.add_argument('-o', '--output-file', type=argparse.FileType('wb'), dest='output_file')
    parser.add_argument('--output-type', action='store', dest='output_type', default='nt')
    parser.add_argument('-q', '--query-file', type=argparse.FileType('r'), dest='query_file')
    parser.add_argument('-s', '--chunk-size', action='store', dest='chunk_size', default=0)
    parser.add_argument('-g', '--graph', type=argparse.FileType('r'), dest='graphs', nargs='+', default=[])
741005
def rectify_pgroups(self):
        
        # add any parameters groups
        pdata_groups = list(self.parameter_data.loc[:,"pargp"].\
            value_counts().keys())
        #print(pdata_groups)
        need_groups = []
        existing_groups = list(self.parameter_groups.pargpnme)
        for pg in pdata_groups:
            if pg not in existing_groups:
                need_groups.append(pg)
        if len(need_groups) > 0:
            #print(need_groups)
            defaults = copy.copy(pst_utils.pst_config["pargp_defaults"])
            for grp in need_groups:
                defaults["pargpnme"] = grp
                self.parameter_groups = \
                    self.parameter_groups.append(defaults,ignore_index=True)

        # now drop any left over groups that aren't needed
        for gp in self.parameter_groups.loc[:,"pargpnme"]:
            if gp in pdata_groups and gp not in need_groups:
                need_groups.append(gp)
        self.parameter_groups.index = self.parameter_groups.pargpnme
        self.parameter_groups = self.parameter_groups.loc[need_groups,:]
447740
def _add_conflicting_arguments(self):
        """"""
        group = self._parser.add_mutually_exclusive_group()
        group.add_argument(
            '-y', '--yes', '--yeah',
            action='store_true',
            help='execute fixed command without confirmation')
        group.add_argument(
            '-r', '--repeat',
            action='store_true',
            help='repeat on failure')
152858
def add(name, gid=None, **kwargs):
    '''
    
    '''
    kwargs = salt.utils.args.clean_kwargs(**kwargs)
    if salt.utils.data.is_true(kwargs.pop('system', False)):
        log.warning('pw_group module does not support the \'system\' argument')
    if kwargs:
        log.warning('Invalid kwargs passed to group.add')

    cmd = 'pw groupadd '
    if gid:
        cmd += '-g {0} '.format(gid)
    cmd = '{0} -n {1}'.format(cmd, name)
    ret = __salt__['cmd.run_all'](cmd, python_shell=False)

    return not ret['retcode']
1203901
def add_arguments(self, parser):
        
        parser.add_argument(
            '--start', '-s',
            default=0,
            type=int,
            help=u"The Submission.id at which to begin updating rows. 0 by default."
        )
        parser.add_argument(
            '--chunk', '-c',
            default=1000,
            type=int,
            help=u"Batch size, how many rows to update in a given transaction. Default 1000.",
        )
        parser.add_argument(
            '--wait', '-w',
            default=2,
            type=int,
            help=u"Wait time between transactions, in seconds. Default 2.",
        )
1006898
protected void addConfiguredProcessorArg(final CommandLineArgument arg) throws NullPointerException, BuildException {
    if (arg == null) {
      throw new NullPointerException("arg");
    }
    if (isReference()) {
      throw noChildrenAllowed();
    }
    this.processorArgs.addElement(arg);
  }
593141
def add_arguments(self, parser):
        
        group = parser.add_mutually_exclusive_group(required=True)
        group.add_argument('-l', '--list', nargs='?',
                           type=str.lower, default='_',
                           choices=['usb', 'ip'],
                           help='list all the connected emulators')
        group.add_argument('-s', '--supported', nargs=1,
                           help='query whether a device is supported')
        group.add_argument('-t', '--test', action='store_true',
                           help='perform a self-test')
        return None