Beispiel #1
0
    def __init__(self, server, output_path, project_key, analyses):
        Common.__init__(self)

        self.__endpoint = server + "api/issues/search"
        self.__page_size = 500
        self.__project_key = project_key
        self.__params = {
            'p': 1,
            'ps': self.__page_size,
            'componentKeys': project_key,
            'createdAfter': '1900-01-01T01:01:01+0100',
            'createdAt': None,
            'severities': None,
            's': 'CREATION_DATE'
        }
        self.__issues_list = []
        self.__total_num_issues = 0
        self.__response = {}

        self.__route_config = RequestsConfig()
        self.__session = self.__route_config.route_session()
        self.__output_path = output_path
        self.__analysis = analyses
        self.__SONAR_ISSUES_TYPE = OrderedDict({
            "project": "object",
            "current_analysis_key": "object",
            "creation_analysis_key": "object",
            "issue_key": "object",
            "type": "object",
            "rule": "object",
            "severity": "object",
            "status": "object",
            "resolution": "object",
            "effort": "Int64",
            "debt": "Int64",
            "tags": "object",
            "creation_date": "object",
            "update_date": "object",
            "close_date": "object",
            "message": "object",
            "component": "object",
            "start_line": "Int64",
            "end_line": "Int64",
            "start_offset": "Int64",
            "end_offset": "Int64",
            "hash": "object",
            "from_hotspot": "object"
        })
Beispiel #2
0
    def __init__(self, terms=None, config_file='ex6-3.twitter.config'):
        """
        Construct a Twitter instance

        :param terms: Words to look for in the Twitter stream
        :param config_file: File that contains the twitter keys
        :return: None
        """

        # Call our parent __init__() function so that they get initializes
        super(Twitter, self).__init__()
        Common.__init__(self)

        # Array of tersm passed on the command line to look for in the Twitter stream
        self.terms = terms

        # Look for the config file in the same directory where this file is located
        self.config_file = os.path.join(os.path.dirname(__file__), config_file)

        # Member variables to store the Twitter keys
        self.consumer_key = None
        self.consumer_secret = None
        self.access_token = None
        self.access_token_secret = None

        # Log level
        self.log_level = logging.INFO

        # Member variable to store our authorization settings
        self.auth = None

        # Tweeter counter dictionary
        self.tweet_term_count = {}
        for term in self.terms:
            self.tweet_term_count[term] = {'term': term, 'count': 0}

        # Application Id properties
        self.properties = {"app_id": self.app_id}

        # Array to store measurements
        self.measurements = []

        # Tracks the number of tweets received
        self.tweet_count = 0

        # Tracks the next time to send tweet measurements
        self.send_time = datetime.now() + timedelta(seconds=60)
    def __init__(self, server, output_path, project_key, analyses, measures_type):
        Common.__init__(self)

        self.__endpoint = server + "api/measures/search_history"
        self.__page_size = 1000
        self.__metrics_params = []
        self.__params = {
            'p': 1,
            'ps': self.__page_size,
            'component': project_key
        }
        self.__measures_list = []
        self.__headers = []
        self.__total_num_measures = 0
        self.__response = {}

        self.__route_config = RequestsConfig()
        self.__session = self.__route_config.route_session()
        self.__output_path = output_path
        self.__project_key = project_key
        self.__analysis = analyses
        self.measures_type = measures_type
Beispiel #4
0
 def __init__(self, device, log_name):
     Common.__init__(self, device, log_name)
     self._ssid = None
 def __init__(self,name,atr,intel,bud,mreq,typ):
     Common.__init__(self,name,atr,intel,typ,bud)
     self.mreq = mreq
     self.status = 'single'
     self.gname = ''
     self.happiness=0
Beispiel #6
0
 def __init__(self, device, log_name):
     Common.__init__(self, device,log_name)
     self.appconfig.set_section("Message")
     self.msgs = {'Audio':"4",'Video':"3",'Photo':"2",'Text':"1"} 
Beispiel #7
0
 def __init__(self, device, log_name):
     Common.__init__(self, device, log_name)
     self.appconfig.set_section("Message")
     self.msgs = {"Audio": "4", "Video": "3", "Photo": "2", "Text": "1"}