From 6407e60359109740531ae1c0c19537926e043882 Mon Sep 17 00:00:00 2001 From: Jeff Jennings Date: Fri, 11 Oct 2024 12:00:41 -0400 Subject: [PATCH 1/3] add bot to author exclusion list --- repo_stats/git_metrics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/repo_stats/git_metrics.py b/repo_stats/git_metrics.py index 300a0c4..191ca52 100644 --- a/repo_stats/git_metrics.py +++ b/repo_stats/git_metrics.py @@ -287,6 +287,7 @@ def process_commits(self, results, age_recent=90): bots = [ "dependabot[bot]", "github-actions", + "github-actions[bot]", "meeseeksmachine", "odidev", "pre-commit-ci[bot]", From f7da9e88e9d94d8aa5f94fc60a07b15ff9b83d61 Mon Sep 17 00:00:00 2001 From: Jeff Jennings Date: Fri, 11 Oct 2024 12:01:20 -0400 Subject: [PATCH 2/3] update plot tick labels --- repo_stats/plot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/repo_stats/plot.py b/repo_stats/plot.py index 1b294c8..b76bec8 100644 --- a/repo_stats/plot.py +++ b/repo_stats/plot.py @@ -79,13 +79,13 @@ def author_time_plot(commit_stats, repo_owner, repo_name, cache_dir, window_avg= plt.axhline(0, c="k", ls="--") - plt.xticks(months[::12], rotation=90) + plt.xticks(ticks=months[::12], labels=[x[:4] for x in months[::12]])#, rotation=90) plt.title( f"Unique authors of commits to {repo_owner}/{repo_name} (generated on {now})" ) plt.legend() - plt.xlabel("Date") + plt.xlabel(f"Date ({datetime.strptime(months[0], '%Y-%m').strftime('%B')} of each year)") plt.ylabel("N") plt.tight_layout() plt.savefig(f"{cache_dir}/{repo_name}_authors.png", dpi=300) @@ -281,13 +281,13 @@ def issue_PR_time_plot(issue_pr_stats, repo_owner, repo_name, cache_dir, window_ label=f"{labels[i]}: {window_avg} month rolling average", ) - plt.xticks(months[i][::12], rotation=90) + plt.xticks(ticks=months[i][::12], labels=[x[:4] for x in months[i][::12]])#, rotation=90) plt.title( f"Issues and PRs opened and closed in {repo_owner}/{repo_name} (generated on {now})" ) plt.legend(ncol=2) - plt.xlabel("Date") + plt.xlabel(f"Date ({datetime.strptime(months[i][0], '%Y-%m').strftime('%B')} of each year)") plt.ylabel("N") plt.tight_layout() plt.savefig(f"{cache_dir}/{repo_name}_issues_PRs.png", dpi=300) From 50a95457484ecefb95c3c981e042839611860214 Mon Sep 17 00:00:00 2001 From: Jeff Jennings Date: Fri, 11 Oct 2024 12:14:32 -0400 Subject: [PATCH 3/3] increase plot font size --- repo_stats/plot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/repo_stats/plot.py b/repo_stats/plot.py index b76bec8..64f6632 100644 --- a/repo_stats/plot.py +++ b/repo_stats/plot.py @@ -8,6 +8,8 @@ ms = [".", "+", "^", "*", "x", "o"] cs = ["#ff8300", "#23d361", "#bf177a", "#20c8ed"] +plt.rcParams['font.size'] = 11 + now = datetime.now(timezone.utc).strftime("%B %d, %Y")