(self)
return True
Returns a boolean whether the data finder can be run.
Returns a boolean whether the data finder can be run.
Returns a boolean whether the data finder can be run .
def can_run(self):
        """Returns a boolean whether the data finder can be run."""
        if not self._rule:
            logger.warning(
                'Unable to run data finder since no rule has been defined.')
            return False

        if not self._start_date:
            logger.warning(
                'Unable to run data finder since no start date has been '
                'defined.')
            return False

        if not self._end_date:
            logger.warning(
                'Unable to run data finder since no end date has been '
                'defined.')
            return False

        if not self._parameters:
            return True

        re_parameters = self._rule.get('re_parameters', [])
        for parameter in re_parameters:
            if not parameter in self._parameters:
                logger.warning(
                    'Parameters are defined, but parameter: [{0:s}] does not '
                    'exist in parameter definitions for the rule.'.format(
                        parameter))
                return False

        return True
def can_run ( self ) : if not self . _rule : logger . warning ( 'Unable to run data finder since no rule has been defined.' ) return False if not self . _start_date : logger . warning ( 'Unable to run data finder since no start date has been ' 'defined.' ) return False if not self . _end_date : logger . warning ( 'Unable to run data finder since no end date has been ' 'defined.' ) return False if not self . _parameters : return True re_parameters = self . _rule . get ( 're_parameters' , [ ] ) for parameter in re_parameters : if not parameter in self . _parameters : logger . warning ( 'Parameters are defined, but parameter: [{0:s}] does not ' 'exist in parameter definitions for the rule.' . format ( parameter ) ) return False return True