Overrides parameters with new values from specified ConfigParams and returns a new ConfigParams object.

        :param config_params: ConfigMap with parameters to override the current values.

        :return: a new ConfigParams object.
499940
def override(self, config_params):
        
        map = StringValueMap.from_maps(self, config_params)
        return ConfigParams(map)
1112618
def update_args(self, args):
        
        for cfg in args:
            keys, v = cfg.split('=', maxsplit=1)
            keylist = keys.split('.')

            dic = self
            for i, k in enumerate(keylist[:-1]):
                assert k in dir(dic), "Unknown config key: {}".format(keys)
                dic = getattr(dic, k)
            key = keylist[-1]

            oldv = getattr(dic, key)
            if not isinstance(oldv, str):
                v = eval(v)
            setattr(dic, key, v)
873254
def add_builtin_parameters(parameters):
    
    with_builtin_parameters = {
        "pm": {
            "run_uuid": str(uuid4()),
            "current_datetime_local": datetime.now(),
            "current_datetime_utc": datetime.utcnow(),
        }
    }

    if parameters is not None:
        with_builtin_parameters.update(parameters)

    return with_builtin_parameters
420858
def _create_and_add_parameters(params):
    '''
    
    '''
    global _current_parameter
    if _is_simple_type(params):
        _current_parameter = SimpleParameter(params)
        _current_option.add_parameter(_current_parameter)
    else:
        # must be a list
        for i in params:
            if _is_simple_type(i):
                _current_parameter = SimpleParameter(i)
            else:
                _current_parameter = TypedParameter()
                _parse_typed_parameter(i)
            _current_option.add_parameter(_current_parameter)
268783
def set_config(self, config):
    
    if self.config is None:
      self.config = { }
    self.config.update(config_to_api_list(config))
647649
public ConfigParams setDefaults(ConfigParams defaultConfigParams) {
		StringValueMap map = StringValueMap.fromMaps(defaultConfigParams, this);
		return new ConfigParams(map);
	}
1184512
def with_updated_configuration(self, options=None,
                                   attribute_options=None):
        
        new_cfg = self.__configurations[-1].copy()
        if not options is None:
            for o_name, o_value in iteritems_(options):
                new_cfg.set_option(o_name, o_value)
        if not attribute_options is None:
            for attr_name, ao_opts in iteritems_(attribute_options):
                for ao_name, ao_value in iteritems_(ao_opts):
                    new_cfg.set_attribute_option(attr_name, ao_name, ao_value)
#        upd_cfg = type(new_cfg)(options=options,
#                                attribute_options=attribute_options)
#        new_cfg.update(upd_cfg)
        return MappingConfigurationContext(self, new_cfg)
765393
def _config_options(func):
    
    for param in SHConfig().get_params()[-1::-1]:
        func = click.option('--{}'.format(param), param,
                            help='Set new values to configuration parameter "{}"'.format(param))(func)
    return func
1143144
def set_config(self, config):
        '''
        
        '''
        if self.launch_url == None:
            self.launch_url = config.launch_url
            self.custom_params.update(config.custom_params)
443848
def parameters(self):
        
        if self._parameters is None:
            self.__init()
        for param in self._parameters:
            if not isinstance(param['defaultValue'], BaseGPObject):
                if param['dataType'] == "GPFeatureRecordSetLayer":
                    param['defaultValue'] = GPFeatureRecordSetLayer.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPString":
                    param['defaultValue'] = GPString.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPLong":
                    param['defaultValue'] = GPLong.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPDouble":
                    param['defaultValue'] = GPDouble.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPDate":
                    param['defaultValue'] = GPDate.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPBoolean":
                    param['defaultValue'] = GPBoolean.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPDataFile":
                    param['defaultValue'] = GPDataFile.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPLinearUnit":
                    param['defaultValue'] = GPLinearUnit.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPMultiValue":
                    param['defaultValue'] = GPMultiValue.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPRasterData":
                    param['defaultValue'] = GPRasterData.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPRasterDataLayer":
                    param['defaultValue'] = GPRasterDataLayer.fromJSON(json.dumps(param))
                elif param['dataType'] == "GPRecordSet":
                    param['defaultValue'] = GPRecordSet.fromJSON(json.dumps(param))
        return self._parameters
481861
def change_options(self, **kwargs):
        '''
        
        '''
        new_options = json.loads(json.dumps(self.viewconf['options']))
        new_options = {**new_options, **kwargs}

        return self.change_attributes(options=new_options)
582570
def filter_params(params):
    
    if params is not None:
        new_params = copy.deepcopy(params)
        new_params = dict((k, v) for k, v in new_params.items() if v is not None)
        for key, value in new_params.items():
            if isinstance(value, bool):
                new_params[key] = "true" if value else "false"
        return new_params
20569
def add_edge_configuration(self, param_name, edge, param_value):
        
        if param_name not in self.config['edges']:
            self.config['edges'][param_name] = {edge: param_value}
        else:
            self.config['edges'][param_name][edge] = param_value
471072
def add_config_argument(arguments)
      arguments['_config'] = @config.clone
      arguments['_config'].delete_if { |k, _| arguments.key?(k) }
      arguments['_config'].delete_if do |k, _|
        @config.class.const_get('DEFAULTS').stringify_keys.key?(k)
      end
      arguments
    end
691176
def set_config_parameter(self, param, value):
        '''

        '''
        with self._mutex:
            if self._obj.set_configuration(param, value) != RTC.RTC_OK:
                raise exceptions.FailedToSetConfigurationError(param, value)
            # Force a reparse of the configuration
            self._configuration = None
972876
def from_config(cls, config, prefix="postmark_", is_uppercase=False):
        
        kwargs = {}
        for arg in get_args(cls):
            key = prefix + arg
            if is_uppercase:
                key = key.upper()
            else:
                key = key.lower()
            if key in config:
                kwargs[arg] = config[key]
        return cls(**kwargs)
57356
def set_params_value(self, *params):
        
        if len(params) != len(self.parameters):
            raise Exception("parameter error")
        temp = self.parameters
        self.parameters = []
        for i in range(len(params)):
            self.parameters.append(Parameter(temp[i]['name'], temp[i]['type']))
            self.parameters[i].set_value(params[i])