Add script: merged PR count per author aggregated by week over the past year - #97
Conversation
Agent-Logs-Url: https://github.com/sdpython/teachpyx/sessions/452c41d6-d398-4a66-b857-558224a8b8a7 Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Agent-Logs-Url: https://github.com/sdpython/teachpyx/sessions/a014fc92-18dd-45ab-bfde-5ceac46f5764 Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Agent-Logs-Url: https://github.com/sdpython/teachpyx/sessions/165cfed9-fab7-41fa-8323-206c02efe66c Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Agent-Logs-Url: https://github.com/sdpython/teachpyx/sessions/fa66ca3f-8015-4f8d-9840-12e3b51b006f Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sdpython/teachpyx/sessions/e9c51566-3ef2-4456-9c5a-f2873fae04a4 Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
xadupre
commented
Apr 24, 2026
@copilot can you replace this by a script outputting images (not a notebook) |
Agent-Logs-Url: https://github.com/sdpython/teachpyx/sessions/52588561-50c4-49d5-8656-4e9a19a3fde0 Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
Done in f0e2806. The notebook has been replaced by Output files produced when running
|
Uh oh!
There was an error while loading. Please reload this page.
Agent-Logs-Url: https://github.com/sdpython/teachpyx/sessions/78df380d-d74e-4801-8672-455b68860a6a Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
…elist) Agent-Logs-Url: https://github.com/sdpython/teachpyx/sessions/f5034d42-d080-4395-b703-b6b441ef8a95 Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
….com/sdpython/teachpyx into copilot/add-merged-prs-weekly-report
Uh oh!
There was an error while loading. Please reload this page.
Creates a standalone Python script that queries the GitHub REST API for merged PRs on one or more repositories, aggregates the results by author and ISO week over the trailing 365 days, and saves the visualisations as PNG images. Fetched data is cached locally to minimise repeated API calls.
New:
_doc/practice/years/2026/github_stat_pr.pyprs_cache_{owner}_{repo}.csv); only fetches PRs merged after the latest cached date from the API (full fetch on first run); merges new rows with the cache, deduplicates, prunes entries older than 365 days, and saves the updated cache. ACACHE_DIRparameter (default".") controls where the files are stored.AUTHOR_WHITELISTparameter (default[]) lets you restrict the analysis to a specific set of GitHub usernames; leave it empty to include all authors. The whitelist applies only to the per-author bar and heatmap charts; the cross-repo line chart always reflects all authors.(repo, author, week)where week is the Monday of each ISO week; produces a combined pivot table (all repos summed, authors ranked by total PR count) as well as per-repo pivot tables when multiple repos are listed.imshowheatmap (author × week) aggregated across all repos; saved asgithub_stat_pr_bar.pngandgithub_stat_pr_heatmap.png.github_stat_pr_lines.png.github_stat_pr_bar_{owner}_{repo}.png,github_stat_pr_heatmap_{owner}_{repo}.png), with the repo name included in the chart title.RuntimeErrorfor HTTP 401 (bad token), 403 (rate-limited), and 404 (repo not found).Run with:
New:
_doc/practice/years/2026/github_stat_pr.rstDocumentation page with a
literalincludeof the script, keeping the toctree entry inindex.rstfunctional.Updated:
_doc/practice/years/2026/index.rstAdded
github_stat_prto the toctree.