You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR addresses @pelikhan's request in discussion #8467 to "add charts and visualization" to the daily-code-metrics workflow, following the pattern from the daily-issues-report workflow.
Issues Found (Analysis)
Daily Code Metrics Workflow
Current State:
Uses shared/trending-charts-simple.md for basic chart support
Generates text-based reports without visual charts
No embedded images in discussion reports
Missing asset upload capability for charts
Comparison with Daily Issues Report:
Daily issues report uses shared/python-dataviz.md for full Python visualization
Generates multiple high-quality charts with matplotlib/seaborn
Uploads charts as assets and embeds them in discussions
Professional 300 DPI charts with consistent styling
Changes Made
.github/workflows/daily-code-metrics.md
Import Updates:
✅ Replaced shared/trending-charts-simple.md with shared/python-dataviz.md
✅ Added shared/trends.md for trending analysis patterns
New Visualization Section:
Added comprehensive "Data Visualization with Python" section specifying 6 required charts:
loc_by_language.png - Bar chart of LOC distribution by programming language
Next run of daily-code-metrics will generate visual charts
Discussion reports will include 6 embedded images
Historical trends will become visually trackable
Reports will match quality of daily-issues-report
Q Optimization: This PR adds the requested visualization capabilities while maintaining workflow efficiency and following established patterns from the repository.
The patch file is available as an artifact (aw.patch) in the workflow run linked above.
To apply the patch locally:
# Download the artifact from the workflow run https://github.com/githubnext/gh-aw/actions/runs/20646646383# (Use GitHub MCP tools if gh CLI is not available)
gh run download 20646646383 -n aw.patch
# Apply the patch
git am aw.patch
Show patch preview (242 of 242 lines)
From 4cce5a175f8fa04957eda188c936fa33978d54f0 Mon Sep 17 00:00:00 2001
From: Q Workflow Optimizer <q-optimizer@github.com>
Date: Thu, 1 Jan 2026 22:28:20 +0000
Subject: [PATCH] Add Python data visualization with 6 charts to
daily-code-metrics workflow
- Replace trending-charts-simple with python-dataviz and trends imports- Add 6 required charts: LOC by language, top directories, quality score breakdown, test coverage, code churn, historical trends- Include detailed Python script structure and chart requirements- Update report format to embed chart images via asset upload- All charts use 300 DPI, 12x7 inches, seaborn styling for professional quality- Follows pattern from daily-issues-report workflow---
.github/workflows/daily-code-metrics.md | 182 +++++++++++++++++++++++-
1 file changed, 179 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/daily-code-metrics.md b/.github/workflows/daily-code-metrics.md
index a78042e..08869dd 100644
--- a/.github/workflows/daily-code-metrics.md+++ b/.github/workflows/daily-code-metrics.md@@ -26,7 +26,8 @@ timeout-minutes: 15
strict: true
imports:
- shared/reporting.md
- - shared/trending-charts-simple.md+ - shared/python-dataviz.md+ - shared/trends.md
---
{{#runtime-import? .github/shared-instructions.md}}
@@ -66,20 +67,194 @@ Store as JSON Lines in `/tmp/gh-aw/repo-memory/default/history.jsonl`:
For each metric: current value, 7-day % change, 30-day % change, trend indicator (⬆️/➡️/⬇️)
+## Data Visualization with Python++Generate **6 high-quality charts** using Python (matplotlib, seaborn) and save to `/tmp/gh-aw/python/charts/`:++### Chart Requirements++All charts must:+- Use DPI 300 minimum for quality+- Figure size: 12x7 inches+- Include clear titles, labels, legends+- Use seaborn styling for professional appearance+- Save as PNG with `bbox_inches='tight'`++### Required Charts++1. **loc_by_language.png** - Bar chart showing LOC distribution by programming language+ - Ho
... (truncated)
Q Workflow Optimization Report
Context
This PR addresses @pelikhan's request in discussion #8467 to "add charts and visualization" to the daily-code-metrics workflow, following the pattern from the daily-issues-report workflow.
Issues Found (Analysis)
Daily Code Metrics Workflow
Current State:
shared/trending-charts-simple.mdfor basic chart supportComparison with Daily Issues Report:
shared/python-dataviz.mdfor full Python visualizationChanges Made
.github/workflows/daily-code-metrics.md
Import Updates:
shared/trending-charts-simple.mdwithshared/python-dataviz.mdshared/trends.mdfor trending analysis patternsNew Visualization Section:
Added comprehensive "Data Visualization with Python" section specifying 6 required charts:
loc_by_language.png - Bar chart of LOC distribution by programming language
top_directories.png - Top 10 directories by LOC
quality_score_breakdown.png - Quality score component breakdown
test_coverage.png - Test vs source code comparison
code_churn.png - Top 10 most changed files (7 days)
historical_trends.png - Multi-line time series
Chart Quality Standards:
bbox_inches='tight'for proper croppingReport Format Updates:
Python Script Structure:
Expected Improvements
User Experience
Technical Benefits
Specific Improvements
Validation
Workflow compiled successfully:
Changes:
.github/workflows/daily-code-metrics.mdImplementation Notes
The workflow now follows the same visualization pattern as
daily-issues-report.md:python-dataviz.mdfor Python environment setupupload assetsafe-output toolThe agent will need to:
References
.github/workflows/daily-issues-report.mdshared/python-dataviz.md,shared/trends.mdNext Steps
After this PR is merged:
Q Optimization: This PR adds the requested visualization capabilities while maintaining workflow efficiency and following established patterns from the repository.
Note
This was originally intended as a pull request, but the git push operation failed.
Workflow Run: View run details and download patch artifact
The patch file is available as an artifact (
aw.patch) in the workflow run linked above.To apply the patch locally:
Show patch preview (242 of 242 lines)