Exemplo n.º 1
0
def get_all_repos(date_bucket_fn, start, lines=False, internal=False):
    repos = [r for r in Repo.from_yaml() if r.track_pulls]

    dimensions = [["merged", "closed", "unresolved", "opened"]]
    if internal:
        dimensions.append(["internal"])
    else:
        dimensions.append(["external"])

    keys = [" ".join(prod) for prod in itertools.product(*dimensions)]
    bucket_blank = dict.fromkeys(keys, 0)

    buckets = collections.defaultdict(lambda: dict(bucket_blank))
    for repo in repos:
        get_bucket_data(buckets, repo.name, date_bucket_fn, start=start, lines=lines, internal=internal)

    print_repo_output(keys, buckets)
Exemplo n.º 2
0
def get_all_repos(date_bucket_fn, start, by_size=False, lines=False, closed=False):
    repos = [r for r in Repo.from_yaml() if r.track_pulls]

    dimensions = []
    if closed:
        dimensions.append(["opened", "merged", "closed"])
    else:
        dimensions.append(["opened", "merged"])
    dimensions.append(["internal", "external"])
    if by_size:
        dimensions.append(["small", "large"])

    keys = [" ".join(prod) for prod in itertools.product(*dimensions)]
    bucket_blank = dict.fromkeys(keys, 0)

    buckets = collections.defaultdict(lambda: dict(bucket_blank))
    for repo in repos:
        get_bucket_data(buckets, repo.name, date_bucket_fn, start=start, by_size=by_size, lines=lines, closed=closed)

    print_repo_output(keys, buckets)
Exemplo n.º 3
0
def get_all_repos(date_bucket_fn, start, lines=False, internal=False):
    repos = [r for r in Repo.from_yaml() if r.track_pulls]

    dimensions = [["merged", "closed", "unresolved", "opened"]]
    if internal:
        dimensions.append(["internal"])
    else:
        dimensions.append(["external"])

    keys = [" ".join(prod) for prod in itertools.product(*dimensions)]
    bucket_blank = dict.fromkeys(keys, 0)

    buckets = collections.defaultdict(lambda: dict(bucket_blank))
    for repo in repos:
        get_bucket_data(buckets,
                        repo.name,
                        date_bucket_fn,
                        start=start,
                        lines=lines,
                        internal=internal)

    print_repo_output(keys, buckets)