data/file_level_aggregation.py
def main(arguments):
    """
    The main function reads the file level signals from the csv file into
    a pandas DataFrame. It creates a DataAggregator with the file level data.
    Then computes the minimum and maximum pull request closed date in the
    whole DataFrame. For each date in the range, aggregate the signals by
    looking forward a specific range of days. Stores the aggregated file level
    signals for each date into different csv files.
    """
    file_level_data = pd.read_csv(
        './%s_file_level_signals.csv' % arguments.repo)
    file_level_data = file_level_data[file_level_data['file name'].notna()]
    data_aggregator = DataAggregator(file_level_data)
    min_date = file_level_data['pull request closed time'].min()
    max_date = file_level_data['pull request closed time'].max()
    start_date = datetime.fromisoformat(min_date[:-1]) \
        + timedelta(days=1)
    end_date = datetime.fromisoformat(max_date[:-1])
    dates = pd.date_range(start=start_date.strftime("%Y-%m-%d"),
                          end=end_date.strftime("%Y-%m-%d"))\
        .to_pydatetime().tolist()
    for date in dates:
        date_str = date.strftime(format="%Y_%m_%d")
        print("Aggregating data on %s" % date_str)
        aggregated_data = data_aggregator\
            .aggregate(date.isoformat(), arguments.range)
        if aggregated_data is not None:
            aggregated_data.to_csv('./%s_%s.csv' % (arguments.repo, date_str))

    The main function reads the file level signals from the csv file into
    a pandas DataFrame. It creates a DataAggregator with the file level data.
    Then computes the minimum and maximum pull request closed date in the
    whole DataFrame. For each date in the range, aggregate the signals by
    looking forward a specific range of days. Stores the aggregated file level
    signals for each date into different csv files.
    
The main function reads the file level signals from the csv file into
a pandas DataFrame. It creates a DataAggregator with the file level data.
Then computes the minimum and maximum pull request closed date in the
whole DataFrame. For each date in the range, aggregate the signals by
looking forward a specific range of days. Stores the aggregated file level
signals for each date into different csv files.
The main function reads the file level signals from the csv file into a pandas DataFrame . It creates a DataAggregator with the file level data . Then computes the minimum and maximum pull request closed date in the whole DataFrame . For each date in the range aggregate the signals by looking forward a specific range of days . Stores the aggregated file level signals for each date into different csv files .
def main(arguments):
    file_level_data = pd.read_csv(
        './%s_file_level_signals.csv' % arguments.repo)
    file_level_data = file_level_data[file_level_data['file name'].notna()]
    data_aggregator = DataAggregator(file_level_data)
    min_date = file_level_data['pull request closed time'].min()
    max_date = file_level_data['pull request closed time'].max()
    start_date = datetime.fromisoformat(min_date[:-1]) \
        + timedelta(days=1)
    end_date = datetime.fromisoformat(max_date[:-1])
    dates = pd.date_range(start=start_date.strftime("%Y-%m-%d"),
                          end=end_date.strftime("%Y-%m-%d"))\
        .to_pydatetime().tolist()
    for date in dates:
        date_str = date.strftime(format="%Y_%m_%d")
        print("Aggregating data on %s" % date_str)
        aggregated_data = data_aggregator\
            .aggregate(date.isoformat(), arguments.range)
        if aggregated_data is not None:
            aggregated_data.to_csv('./%s_%s.csv' % (arguments.repo, date_str))
def main ( arguments ) : file_level_data = pd . read_csv ( './%s_file_level_signals.csv' % arguments . repo ) file_level_data = file_level_data [ file_level_data [ 'file name' ] . notna ( ) ] data_aggregator = DataAggregator ( file_level_data ) min_date = file_level_data [ 'pull request closed time' ] . min ( ) max_date = file_level_data [ 'pull request closed time' ] . max ( ) start_date = datetime . fromisoformat ( min_date [ : - 1 ] ) + timedelta ( days = 1 ) end_date = datetime . fromisoformat ( max_date [ : - 1 ] ) dates = pd . date_range ( start = start_date . strftime ( "%Y-%m-%d" ) , end = end_date . strftime ( "%Y-%m-%d" ) ) . to_pydatetime ( ) . tolist ( ) for date in dates : date_str = date . strftime ( format = "%Y_%m_%d" ) print ( "Aggregating data on %s" % date_str ) aggregated_data = data_aggregator . aggregate ( date . isoformat ( ) , arguments . range ) if aggregated_data is not None : aggregated_data . to_csv ( './%s_%s.csv' % ( arguments . repo , date_str ) )
The main function reads the file level signals from the csv file into
a pandas DataFrame.
The main function reads the file level signals from the csv file into a pandas DataFrame .
"""
    The main function reads the file level signals from the csv file into
    a pandas DataFrame. It creates a DataAggregator with the file level data.
    Then computes the minimum and maximum pull request closed date in the
    whole DataFrame. For each date in the range, aggregate the signals by
    looking forward a specific range of days. Stores the aggregated file level
    signals for each date into different csv files.
    """
arguments