wads.repo_audit¶
Read-only health audit of a (wads-managed) Python repo.
Checks every health dimension a repo doctor cares about — legacy packaging leftovers, pyproject metadata shape, CI workflow generation (uv stub / inline uv / 2025 / legacy / none), stale test paths, module docstring presence, GitHub metadata drift (description / homepage / topics vs pyproject), Pages status, latest CI run conclusion, and PyPI-vs-pyproject version sync — and prints a prioritized report grouped HIGH / MEDIUM / LOW, each finding tagged with the specialist skill (or CLI) that owns the fix.
This module is the single source of truth for the ecosystem’s “what is a modern wads repo” classification. Import it:
from wads.repo_audit import audit_repo
report = audit_repo("/path/to/repo", network=False) # dict: facts + findings
or run it as a script / module:
python -m wads.repo_audit [REPO_DIR] [--json] [--no-network]
REPO_DIR defaults to the current directory. --json emits the full
machine-readable report. --no-network skips everything that leaves the
machine (gh calls and the PyPI lookup); it also degrades gracefully when
gh is absent or offline.
Stdlib only. Strictly read-only: never modifies the target repo or anything
else. The wads-repo-doctor skill ships a thin shim (scripts/repo_audit.py)
that defers to this module.
Functions
|
|
|
|
|
|
|
gh-based checks; every step degrades silently when gh/network fail. |
|
|
|
|
|
|
|
Audit a repo and return the machine-readable report dict. |
|
|
|
Classify one workflow file's text into a wads CI generation. |
|
|
|
|
|
|
|
Classes
|
Accumulates facts and findings; renders text or JSON. |
- class wads.repo_audit.Report(repo)[source]¶
Bases:
objectAccumulates facts and findings; renders text or JSON.
- wads.repo_audit.audit_github(repo_slug, rep, project, docs_enabled)[source]¶
gh-based checks; every step degrades silently when gh/network fail.
- wads.repo_audit.audit_repo(repo='.', *, network=True)[source]¶
Audit a repo and return the machine-readable report dict.
This is the importable entry point (the SSOT classifier). It returns the same structure as
python -m wads.repo_audit <repo> --json:{"repo": ..., "summary": {HIGH/MEDIUM/LOW counts}, "findings": [...], "facts": {...}}
network=Falseskips everything that leaves the machine (gh+ PyPI), matching the--no-networkCLI flag.