Set up custom arguments needed for this profile.
971412
def setup_argparse(self, argument_parser):
    """"""
    import glob
    import logging
    import argparse

    def get_fonts(pattern):

      fonts_to_check = []
      # use glob.glob to accept *.ufo

      for fullpath in glob.glob(pattern):
        fullpath_absolute = os.path.abspath(fullpath)
        if fullpath_absolute.lower().endswith(".ufo") and os.path.isdir(
            fullpath_absolute):
          fonts_to_check.append(fullpath)
        else:
          logging.warning(
              ("Skipping '{}' as it does not seem "
               "to be valid UFO source directory.").format(fullpath))
      return fonts_to_check

    class MergeAction(argparse.Action):

      def __call__(self, parser, namespace, values, option_string=None):
        target = [item for l in values for item in l]
        setattr(namespace, self.dest, target)

    argument_parser.add_argument(
        'fonts',
        # To allow optional commands like "-L" to work without other input
        # files:
        nargs='*',
        type=get_fonts,
        action=MergeAction,
        help='font file path(s) to check.'
        ' Wildcards like *.ufo are allowed.')

    return ('fonts',)
1147251
def profile_setting_default_args(ij):
        

        # build default args
        profile_default_args = OrderedDict()
        profile_default_args['api_default_org'] = '$env.API_DEFAULT_ORG'
        profile_default_args['api_access_id'] = '$env.API_ACCESS_ID'
        profile_default_args['api_secret_key'] = '$envs.API_SECRET_KEY'
        profile_default_args['tc_api_path'] = '$env.TC_API_PATH'
        profile_default_args['tc_docker'] = False
        profile_default_args['tc_in_path'] = 'log'
        profile_default_args['tc_log_level'] = 'debug'
        profile_default_args['tc_log_path'] = 'log'
        profile_default_args['tc_log_to_api'] = False
        profile_default_args['tc_out_path'] = 'log'
        profile_default_args['tc_proxy_external'] = False
        profile_default_args['tc_proxy_host'] = '$env.TC_PROXY_HOST'
        profile_default_args['tc_proxy_port'] = '$env.TC_PROXY_PORT'
        profile_default_args['tc_proxy_password'] = '$envs.TC_PROXY_PASSWORD'
        profile_default_args['tc_proxy_tc'] = False
        profile_default_args['tc_proxy_username'] = '$env.TC_PROXY_USERNAME'
        profile_default_args['tc_temp_path'] = 'log'
        if ij.get('runtimeLevel') == 'Playbook':
            profile_default_args['tc_playbook_db_type'] = 'Redis'
            profile_default_args['tc_playbook_db_context'] = str(uuid4())
            profile_default_args['tc_playbook_db_path'] = '$env.DB_PATH'
            profile_default_args['tc_playbook_db_port'] = '$env.DB_PORT'
            profile_default_args['tc_playbook_out_variables'] = ''
        return profile_default_args
1135856
def set_args(self, arguments):
        
        return lib.zproc_set_args(self._as_parameter_, byref(zlist_p.from_param(arguments)))
596722
public void setProfile(OperaProfile profile) {
    options.get(PROFILE).setValue(PROFILE.sanitize(profile));
    supportsPd = true;
  }
618542
def command_init(prog_name, prof_mgr, prof_name, prog_args):

	
	
	# Retrieve arguments
	parser = argparse.ArgumentParser(
		prog=prog_name
	)
	parser.add_argument(
		"type",
		metavar="type",
		type=str,
		nargs=1,
		help="profile type"
	)
	args = parser.parse_args(prog_args)
	
	# Profile store
	prof_type = args.type[0]
	prof_mgr.store(prof_name, prof_type)
429224
protected function _setProfile() {
        $projectName = basename(dirname(realpath(APPLICATION_PATH)));
        $profileName = $projectName . '_' . APPLICATION_ENV;

        $this->_profile = $profileName;
    }
364606
def __init_run(self, args, kwargs, extra_parameter_errors):
        """"""
        assert not self.active()
        self.__args = list(args)
        self.__kwargs = dict(kwargs)
        self.__extra_parameter_errors = extra_parameter_errors
        self.__args_count = len(args) + len(kwargs)
        self.__params_with_arguments = set()
        self.__stack = []
        self.__push_frame(None)
554871
protected function buildProfile() {
		$sql = "SELECT * FROM {$this->primaryTable} WHERE id=:id";
		if ($user = $this->executeQuery($sql,array(":id"=>$this->getSessionUserId()))[0]) {
			unset($user['password']);
			foreach ($user as $field=>$value) {
				$this->profile[$field] = $value;
			}
		}
	}
1260612
def setup_parameters(self):
        """"""
        t = self.template
        parameters = self.get_parameter_definitions()

        if not parameters:
            logger.debug("No parameters defined.")
            return

        for name, attrs in parameters.items():
            p = build_parameter(name, attrs)
            t.add_parameter(p)
1089050
def set_up(self):
        """"""
        self.path.profile = self.path.gen.joinpath("profile")

        if not self.path.profile.exists():
            self.path.profile.mkdir()

        self.python = hitchpylibrarytoolkit.project_build(
            "strictyaml",
            self.path,
            self.given["python version"],
            {"ruamel.yaml": self.given["ruamel version"]},
        ).bin.python

        self.example_py_code = (
            ExamplePythonCode(self.python, self.path.gen)
            .with_code(self.given.get("code", ""))
            .with_setup_code(
                self.given.get("setup", "")
            )
            .with_terminal_size(160, 100)
            .with_strings(
                yaml_snippet_1=self.given.get("yaml_snippet_1"),
                yaml_snippet=self.given.get("yaml_snippet"),
                yaml_snippet_2=self.given.get("yaml_snippet_2"),
                modified_yaml_snippet=self.given.get("modified_yaml_snippet"),
            )
        )
591180
def do_profile(self,args):
        
        parser = CommandArgumentParser("profile")
        parser.add_argument(dest="profile",help="Profile name")
        parser.add_argument('-v','--verbose',dest="verbose",action='store_true',help='verbose')
        args = vars(parser.parse_args(args))

        profile = args['profile']
        verbose = args['verbose']
        if verbose:
            print "Selecting profile '{}'".format(profile)

        selectedProfile = {}
        if profile in Config.config['profiles']:
            selectedProfile = Config.config['profiles'][profile]

        selectedProfile['name'] = profile
        Config.config['selectedProfile'] = selectedProfile

        awsProfile = profile
        if 'awsProfile' in selectedProfile:
            awsProfile = selectedProfile['awsProfile']
        AwsConnectionFactory.resetInstance(profile=awsProfile)
26115
def _attach_arguments(self):
        """"""
        for arg in self.arguments:
            self.parser.add_argument(*arg[0], **arg[1])
88247
def add_auth_args(parser, config):

    """"""

    parser.add_argument('-p', '--provider', default=config.DEFAULT_PROVIDER)
    parser.add_argument('-u', '--userid', default=config.DEFAULT_USERID)
    parser.add_argument('-k', '--secret_key', default=config.DEFAULT_SECRET_KEY)
    return parser
199611
def profile(self, value):
        
        if value not in VALID_PROFILES:
            raise TypeError('Profile option must be one of: ' + ', '.join(VALID_PROFILES))

        self._body['profile'] = value
279010
def build_user_requested_parameters(request, meta):
    """"""

    postParameters = {}
    getParameters = {}
    files = {}

    # Add parameters requested by the server
    if 'user_info' in meta:
        for prop in meta['user_info']:

            # Test if the value exist, otherwise return None
            value = None
            if hasattr(request.user, prop) and prop in settings.PIAPI_USERDATA:
                value = getattr(request.user, prop)
            else:
                raise Exception('requested user attribute "%s", '
                                'does not exist or requesting is not allowed' % prop)

            # Add informations to get or post parameters, depending on the current method
            if request.method == 'POST':
                postParameters['ebuio_u_' + prop] = value
            else:
                getParameters['ebuio_u_' + prop] = value

    return (getParameters, postParameters, files)
528002
def add_args(self, args):
        
        for key, value in vars(args).items():
            if value is not None:
                setattr(self, key.upper(), value)
1039872
def run(self, *args):
        """"""

        uuid, kwargs = self.__parse_arguments(*args)
        code = self.edit_profile(uuid, **kwargs)

        return code