Add Python visualization charts to daily-code-metrics workflow #8520
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds 6 high-quality visualization charts to the daily-code-metrics workflow, matching the pattern established in daily-issues-report.
Changes
Imports & Configuration
shared/trending-charts-simple.md→shared/python-dataviz.md+shared/trends.mdupload-assetsafe-output for chart publishingRequired Charts (300 DPI, 12x7", seaborn styling)
loc_by_language.png- LOC distribution by language (horizontal bar)top_directories.png- Top 10 directories by LOC with percentagesquality_score_breakdown.png- Quality components: Test 30%, Organization 25%, Docs 20%, Churn 15%, Comments 10%test_coverage.png- Test vs source LOC comparison with ratioscode_churn.png- Top 10 changed files (7d, diverging bar)historical_trends.png- 30-day trends: LOC, test coverage %, quality score (multi-line series)Report Format
Example Chart Specification
File Size: 392 lines (+296), lock file 2,215 lines (+900)
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/githubnext/gh-aw/actions/artifacts/5004790282/zip/usr/bin/curl curl -L -H Accept: application/vnd.github+json -H Authorization: Bearer -H X-GitHub-Api-Version: 2022-11-28 REDACTED -o /tmp/aw.patch.zip(http block)https://api.github.com/user/usr/bin/gh gh api user --jq .login it/ref/tags/v5 -buildtags 0s -errorsas -ifaceassert -nilfunc /home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.lin--jq -o ithub/workflows -importcfg /usr/bin/git l -w -buildmode=exe git(http block)/usr/bin/gh gh api user --jq .login log.showsignature=false t by/804a3f7ea1eee2f4a942edb29dc73fdf1b2e6a418612e952c156d66c063c08d0/log.json -n1 --format=format:--check 46b59b86ff4a /home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.nonexistent-invalid-image-for-testing-12345 c156�� 4328-45940/test-purge-campaign-2173068326/.github/workflows -buildtags(http block)/usr/bin/gh gh api user --jq .login it/ref/tags/v5 --json 8eea5023815439530e8489ee62cacbb31be/log.json --jq .owner.login + "api ux-amd64/pkg/toouser git rev-�� ithub-script/git/ref/tags/v8 ux-amd64/pkg/too-buildtags /usr/bin/gh -json GO111MODULE l/linux_amd64/li"mcp-server-playwright" --help gh(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>Add charts and visualization to daily-code-metrics workflow</issue_title>
<issue_description># 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
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.