def sec_overview(self):
        """
        Generate the data for the Overview section in the report
        :return:
        """

        """ Data sources overview: table with metric summaries"""
        metrics = self.config['overview']['activity_metrics']
        file_name = self.config['overview']['activity_file_csv']

        data_path = os.path.join(self.data_dir, "data")
        file_name = os.path.join(data_path, file_name)

        logger.debug("CSV file %s generation in progress", file_name)

        csv = 'metricsnames,netvalues,relativevalues,datasource\n'
        for metric in metrics:
            # comparing current metric month count with previous month
            es_index = self.get_metric_index(metric)
            ds = metric.ds.name
            m = metric(self.es_url, es_index, start=self.start, end=self.end)
            (last, percentage) = m.get_trend()
            csv += "%s,%i,%i,%s" % (metric.name, last, percentage, ds)
            csv += "\n"
        os.makedirs(os.path.dirname(file_name), exist_ok=True)
        with open(file_name, "w") as f:
            # Hack, we need to fix LaTeX escaping in a central place
            csv = csv.replace("_", r"\_")
            f.write(csv)

        logger.debug("CSV file: %s was generated", file_name)

        """
        Git Authors:

        description: average number of developers per month by quarters
        (so we have the average number of developers per month during
        those three months). If the approach is to work at the level of month,
        then just the number of developers per month.
        """

        author = self.config['overview']['author_metrics'][0]
        csv_labels = 'labels,' + author.id
        file_label = author.ds.name + "_" + author.id
        title_label = author.name + " per " + self.interval
        self.__create_csv_eps(author, None, csv_labels, file_label, title_label)

        logger.debug("CSV file %s generation in progress", file_name)

        bmi = []
        ttc = []  # time to close

        csv_labels = ''
        for m in self.config['overview']['bmi_metrics']:
            metric = m(self.es_url, self.get_metric_index(m),
                       start=self.end_prev_month, end=self.end)
            csv_labels += m.id + ","
            bmi.append(metric.get_agg())

        for m in self.config['overview']['time_to_close_metrics']:
            metric = m(self.es_url, self.get_metric_index(m),
                       start=self.end_prev_month, end=self.end)
            csv_labels += m.id + ","
            ttc.append(metric.get_agg())

        csv = csv_labels[:-1] + "\n"  # remove last comma
        csv = csv.replace("_", "")
        for val in bmi:
            csv += "%s," % (self.str_val(val))
        for val in ttc:
            csv += "%s," % (self.str_val(val))
        if csv[-1] == ',':
            csv = csv[:-1]

        data_path = os.path.join(self.data_dir, "data")
        file_name = os.path.join(data_path, 'efficiency.csv')
        os.makedirs(os.path.dirname(file_name), exist_ok=True)
        with open(file_name, "w") as f:
            f.write(csv)

        logger.debug("CSV file: %s was generated", file_name)
def sec_overview ( self ) : """ Data sources overview: table with metric summaries""" metrics = self . config [ 'overview' ] [ 'activity_metrics' ] file_name = self . config [ 'overview' ] [ 'activity_file_csv' ] data_path = os . path . join ( self . data_dir , "data" ) file_name = os . path . join ( data_path , file_name ) logger . debug ( "CSV file %s generation in progress" , file_name ) csv = 'metricsnames,netvalues,relativevalues,datasource\n' for metric in metrics : es_index = self . get_metric_index ( metric ) ds = metric . ds . name m = metric ( self . es_url , es_index , start = self . start , end = self . end ) ( last , percentage ) = m . get_trend ( ) csv += "%s,%i,%i,%s" % ( metric . name , last , percentage , ds ) csv += "\n" os . makedirs ( os . path . dirname ( file_name ) , exist_ok = True ) with open ( file_name , "w" ) as f : csv = csv . replace ( "_" , r"\_" ) f . write ( csv ) logger . debug ( "CSV file: %s was generated" , file_name ) """
        Git Authors:
        description: average number of developers per month by quarters
        (so we have the average number of developers per month during
        those three months). If the approach is to work at the level of month,
        then just the number of developers per month.
        """ author = self . config [ 'overview' ] [ 'author_metrics' ] [ 0 ] csv_labels = 'labels,' + author . id file_label = author . ds . name + "_" + author . id title_label = author . name + " per " + self . interval self . __create_csv_eps ( author , None , csv_labels , file_label , title_label ) logger . debug ( "CSV file %s generation in progress" , file_name ) bmi = [ ] ttc = [ ] csv_labels = '' for m in self . config [ 'overview' ] [ 'bmi_metrics' ] : metric = m ( self . es_url , self . get_metric_index ( m ) , start = self . end_prev_month , end = self . end ) csv_labels += m . id + "," bmi . append ( metric . get_agg ( ) ) for m in self . config [ 'overview' ] [ 'time_to_close_metrics' ] : metric = m ( self . es_url , self . get_metric_index ( m ) , start = self . end_prev_month , end = self . end ) csv_labels += m . id + "," ttc . append ( metric . get_agg ( ) ) csv = csv_labels [ : - 1 ] + "\n" csv = csv . replace ( "_" , "" ) for val in bmi : csv += "%s," % ( self . str_val ( val ) ) for val in ttc : csv += "%s," % ( self . str_val ( val ) ) if csv [ - 1 ] == ',' : csv = csv [ : - 1 ] data_path = os . path . join ( self . data_dir , "data" ) file_name = os . path . join ( data_path , 'efficiency.csv' ) os . makedirs ( os . path . dirname ( file_name ) , exist_ok = True ) with open ( file_name , "w" ) as f : f . write ( csv ) logger . debug ( "CSV file: %s was generated" , file_name )
Generate the data for the Overview section in the report
        :return: