Пример #1
0
    pyplot.grid(b=False, which='both', axis='both')
    pyplot.xticks([], [])
    pyplot.yticks([], [])
    pyplot.xlim(-1, window + 1)
    ax = pyplot.gca()
    ax.set_frame_on(True)
    ax.set_facecolor('black')  # change to (24, 24, 24)
    fig = pyplot.gcf()
    fig.set_size_inches(2, 2. / 3)
    fig.savefig('total_contribs_small.png', bbox_inches='tight', pad_inches=0)
    pyplot.close()


if __name__ == '__main__':
    # load patch info
    contribs_by_date, ts_by_person = load_commits()
    # update the data first
    most_recent_date = max(contribs_by_date.keys())
    most_recent_date = datetime.datetime.strptime(
        most_recent_date, '%Y-%m-%d').date()
    print 'Last date found in data file:', most_recent_date
    print 'Last date found in source repo:', LAST_DATE

    # load review info
    reviewers_by_date = load_reviewers(REVIEWS_FILENAME)
    client_reviewers_by_date = load_reviewers(CLIENT_REVIEWS_FILENAME)
    for d, person_set in client_reviewers_by_date.iteritems():
        reviewers_by_date[d].update(person_set)

    contrib_window = datetime.timedelta(days=14)
    review_window = datetime.timedelta(days=3)
Пример #2
0
    matplotlib.rcParams["xtick.labelsize"] = 8
    matplotlib.rcParams["ytick.labelsize"] = 8
    matplotlib.rcParams["text.color"] = "k"

    fig = pyplot.gcf()
    fig.set_size_inches(24, 8)

    fig.savefig("contrib_predictions.png")

    fig2 = prophet.plot_components(forecast)
    fig2.savefig("contrib_predictions_components.png")


if __name__ == '__main__':
    # load patch info
    contribs_by_date, ts_by_person = load_commits()
    # update the data first
    most_recent_date = max(contribs_by_date.keys())
    most_recent_date = datetime.datetime.strptime(most_recent_date,
                                                  '%Y-%m-%d').date()
    print 'Last date found in data file:', most_recent_date
    print 'Last date found in source repo:', LAST_DATE

    # load review info
    reviewers_by_date = load_reviewers(REVIEWS_FILENAME)
    client_reviewers_by_date = load_reviewers(CLIENT_REVIEWS_FILENAME)
    for d, person_set in client_reviewers_by_date.iteritems():
        reviewers_by_date[d].update(person_set)

    contrib_window = datetime.timedelta(days=14)
    review_window = datetime.timedelta(days=3)
Пример #3
0
#!/usr/bin/env python

from collections import defaultdict
import json

from utils import REVIEWS_FILENAME as ALL_PATCHES_FILENAME
from parse_commits_into_json import load_commits
from contrib_stats import load_reviewers
from get_stars import weights, get_stars_by_starer, get_ordered_patches

REVIEWS_FILENAME = "swift-open-comments.patches"

reviewers_by_date = load_reviewers(REVIEWS_FILENAME)
authors_by_date, ts_by_person = load_commits()
stars_by_starer = get_stars_by_starer()

all_contributors = set()
all_contributors.update(ts_by_person.keys())
for d in reviewers_by_date:
    all_contributors.update(reviewers_by_date[d])


len(all_contributors)  # why is this so much smaller than the total number in the other script?


bots = (
    "*****@*****.**",
    "*****@*****.**",
    "*****@*****.**",
    "*****@*****.**",
    "*****@*****.**",
Пример #4
0
#!/usr/bin/env python2.7

from collections import defaultdict
import json

from utils import REVIEWS_FILENAME as ALL_PATCHES_FILENAME
from parse_commits_into_json import load_commits
from contrib_stats import load_reviewers
from get_stars import weights, get_stars_by_starer, get_ordered_patches

REVIEWS_FILENAME = 'swift-open-comments.patches'

reviewers_by_date = load_reviewers(REVIEWS_FILENAME)
authors_by_date, ts_by_person = load_commits()
stars_by_starer = get_stars_by_starer()

all_contributors = set()
all_contributors.update(ts_by_person.keys())
for d in reviewers_by_date:
    all_contributors.update(reviewers_by_date[d])

len(all_contributors
    )  # why is this so much smaller than the total number in the other script?

bots = (
    '*****@*****.**',
    '*****@*****.**',
    '*****@*****.**',
    '*****@*****.**',
    '*****@*****.**',
    '*****@*****.**',