Skip to content

[refactoring] Adopt shared/python-dataviz.md in matplotlib-using workflows to reduce duplicated Python setup #49040

Description

@github-actions

Skill: Standardize Python data-viz setup via shared/python-dataviz.md

Current usage / duplication

At least 12 workflows use matplotlib/pandas/seaborn for chart generation but do not import the existing shared/python-dataviz.md (or shared/charts-with-trending.md) component, each re-implementing venv/pip-install/directory-setup boilerplate inline:

  • agentic-token-audit.md (299 lines) — custom pip install --target .../site-packages + manual PYTHONPATH wiring (lines ~43-46, ~199)
  • agentic-token-trend-audit.md (277 lines) — same custom pattern (lines ~47-50, ~197)
  • api-consumption-report.md (500 lines)
  • daily-code-metrics.md (286 lines)
  • daily-experiment-report.md (611 lines) — uses pypy3 -m pip install --quiet numpy matplotlib (line ~38)
  • daily-firewall-report.md (351 lines)
  • daily-issues-report.md (410 lines) — inline import matplotlib.pyplot as plt (line ~138)
  • daily-news.md (563 lines) — pandas + matplotlib/seaborn processing (lines ~376, ~498)
  • daily-performance-summary.md (515 lines) — manually creates /tmp/gh-aw/python/{data,charts} (lines ~136-137), duplicating what shared/python-dataviz.md already provides
  • daily-repo-chronicle.md (251 lines)
  • prompt-clustering-analysis.md (643 lines) — inline import matplotlib.pyplot as plt (line ~277)
  • weekly-issue-summary.md (162 lines)

Only 4 workflows currently import shared/python-dataviz.md directly, and 6 import the higher-level shared/charts-with-trending.md. Setup approaches diverge (--target vs venv vs pypy3), risking version drift and duplicated failure modes (e.g. --break-system-packages issues that python-dataviz.md already solves via a venv).

Proposed shared component

Already exists: shared/python-dataviz.md (and shared/charts-with-trending.md for workflows that also need trending/cache-memory). This is an adoption task, not a new-component task.

Estimated impact

  • 12 workflows affected
  • ~150-300 total lines of duplicated setup boilerplate removable
  • Maintenance benefit: pip version bumps / venv fixes happen in one place instead of N inconsistent inline copies

Migration plan

  1. For each workflow above, replace inline pip install/venv setup steps with imports: [shared/python-dataviz.md] (or shared/charts-with-trending.md if trending/cache-memory is also used).
  2. Remove manual mkdir -p /tmp/gh-aw/python/* steps and site-packages/PYTHONPATH wiring; update Python snippets to use /tmp/gh-aw/python/{data,charts,artifacts} per the shared convention.
  3. Recompile each workflow (make recompile) and diff generated .lock.yml to confirm no regression.
  4. Spot-check chart upload via upload-asset safe-output still functions for one migrated workflow.

Example usage

imports:
  - shared/python-dataviz.md
  - shared/trends.md

Generated by 🔍 Workflow Skill Extractor · aut00 · 63.5 AIC · ⌖ 5.58 AIC · ⊞ 6.8K ·

  • expires on Jul 31, 2026, 8:46 PM UTC-08:00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions