Check if required parameters for a tool launch are set.
183929
def has_required_params(self):
        '''
        
        '''
        return self.consumer_key and\
                self.consumer_secret and\
                self.resource_link_id and\
                self.launch_url
70099
def _check_unused_parameters(self):
        """"""
        all_params = set(self.parameters.keys())
        processed_params = set(self._processed_parameters)
        unused_params = all_params - processed_params - RESERVED_ARGS

        if unused_params:
            self.log.warning(
                "The following parameters were ignored: {}".format(
                    ', '.join(sorted(unused_params))
                )
            )
668507
private function validateScriptParams()
    {
        $this->script_params = array_intersect_key(
            $this->script_params,
            array_fill_keys(self::$valid_script_params, null)
        );
    }
468531
function(methodDef, callback, params, payload) {
        // check required params
        for (var index in methodDef.required_params) {
            var requiredParamName = methodDef.required_params[index];
            if (!params.hasOwnProperty(requiredParamName)) {
                callback(requiredParamName +' param is required');
                return false;
            }
        }
        // check unattended params
        if (methodDef.unattended_params === false) {
            for (var param in params) {
                if (methodDef.optional_params.indexOf(param) == -1
                    && methodDef.required_params.indexOf(param) == -1) {
                    callback('unattended param '+ param);
                    return false;
                }
            }
        }
        // TODO: optional_payload is also on spore specification
        if (!payload && methodDef.required_payload === true) {
            callback("payload is required");
            return false;
        }
        return true;
    }
1244490
private void validateParameterProviders() {
    Set<String> parameterNames = new HashSet<>();
    for (ParameterProvider provider : this.parameterProviders) {
      Set<String> applicationIdsOfThisProvider = new HashSet<>();
      for (Parameter<?> parameter : provider.getParameters()) {
        if (StringUtils.isNotEmpty(parameter.getApplicationId())) {
          applicationIdsOfThisProvider.add(parameter.getApplicationId());
        }
        if (parameterNames.contains(parameter.getName())) {
          log.warn("Parameter name is not unique: {} (application: {})", parameter.getName(), parameter.getApplicationId());
        }
        else {
          parameterNames.add(parameter.getName());
        }
      }
      if (applicationIdsOfThisProvider.size() > 1) { //NOPMD
        log.warn("Parameter provider {} defines parameters with multiple application Ids: {}", provider,
            applicationIdsOfThisProvider.toArray(new String[applicationIdsOfThisProvider.size()]));
      }
    }
  }
1215238
protected function checkParameters()
    {
        if (isset($this->parameters['searchParameterName'])) {
            $this->searchParameterName = $this->parameters['searchParameterName'];
        }

        if (isset($this->parameters['searchResultsParameterName'])) {
            $this->searchParameterName = $this->parameters['searchResultsParameterName'];
        }
    }
190639
private void checkDefaults() {
        Utils.require(m_shards != null || m_shardsRange != null, "shards or range parameter is not set");
        Utils.require(m_shards == null || m_shardsRange == null, "shards and range parameters cannot be both set");
        
        Utils.require(m_xshards == null || m_xshardsRange == null, "xshards and xrange parameters cannot be both set");
        if(m_xshards == null && m_xshardsRange == null) {
        	m_xshards = m_shards;
        	m_xshardsRange = m_shardsRange;
        }
        
        if (m_query == null) m_query = "*";
        if(m_metrics == null) m_metrics = "COUNT(*)";
    }
807191
def check_params(**kwargs):
    

    missing_params = []
    check = True

    for param in kwargs:
        if kwargs[param] is None:
            missing_params.append(param)

    if len(missing_params) > 0:
        print("POT - Warning: following necessary parameters are missing")
        for p in missing_params:
            print("\n", p)

        check = False

    return check
456962
@Override
    protected void checkParameters() {
        super.checkParameters();

        if (outputFile == null) {
            throw new BuildException("output attribute is required", getLocation());
        }

        if (inputFile == null) {
            throw new BuildException("inputFile element is required");
        }

        checkBoolean(withMessages, "withMessages");
        checkBoolean(resetSource, "resetSource");
    }
730108
def _check_load_parameters(self, **kwargs):
        
        rset = self._meta_data['required_load_parameters']
        check = _missing_required_parameters(rset, **kwargs)
        if check:
            check.sort()
            error_message = 'Missing required params: %s' % check
            raise MissingRequiredReadParameter(error_message)
306251
def check_command(args):
    """"""
    outdated = check_requirements_file(args.requirements_file,
                                       args.skip_packages)

    if outdated:
        print('Requirements in {} are out of date:'.format(
            args.requirements_file))

        for item in outdated:
            print(' * {} is {} latest is {}.'.format(*item))

        sys.exit(1)
    else:
        print('Requirements in {} are up to date.'.format(
            args.requirements_file))
779040
private function checkParams()
    {
        if ($this->file === null && empty($this->filesets) && empty($this->dirsets)) {
            throw new BuildException(
                "Specify at least one source - a file, dirset or a fileset."
            );
        }

        if ($this->mode === null) {
            throw new BuildException("You have to specify an octal mode for chmod.");
        }

        // check for mode to be in the correct format
        if (!preg_match('/^([0-7]){3,4}$/', $this->mode)) {
            throw new BuildException("You have specified an invalid mode.");
        }
    }
176160
def checkUpdate(self, *args):
        
        g = get_root(self).globals
        if not self.check():
            g.clog.warn('Current observing parameters are not valid.')
            return False

        if not g.ipars.check():
            g.clog.warn('Current instrument parameters are not valid.')
            return False
1213308
def _verify_params(self):
        
        reserved_in_use = self._RESERVED_PARAMS.intersection(self.extra_params)
        if reserved_in_use:
            raise ValueError("Using a reserved parameter", reserved_in_use)
249459
def check_in(request, action):
    """"""
    if not request:
        req_str = ""
        for idx, val in enumerate(actions[action]):
            req_str += "\n" + val
        erstr = "Provide a request dict with the following properties:" \
                " %s" % req_str
        raise ValueError(erstr)

    required_fields = actions[action]
    missing = []
    for field in required_fields:
        if not is_key_present(request, field):
            missing.append(field)
    if missing:
        missing_string = ""
        for idx, val in enumerate(missing):
            missing_string += "\n" + val
        erstr = "Provide the required request parameters to" \
                " complete this request: %s" % missing_string
        raise ValueError(erstr)

    return True
1334134
def check_valid(self, get_params):
        
        if self.commands._if:
            return self.commands._if.check_valid(get_params)
1143625
private synchronized boolean canLaunchSetupTask() {
    return (tasksInited.get() && status.getRunState() == JobStatus.PREP &&
           !launchedSetup && !jobKilled && !jobFailed);
  }