tepyd report¶
Everything the static lenses know, ranked and explained.
report runs shape and gaps, distils them into a list of findings, and renders each one three ways: what it is, why it matters (the pyramid principle behind it), and how to fix it.
$ tepyd report # console report, "senior" level
$ tepyd report --format md # Markdown, for a PR comment or a committed file
$ tepyd report --level newb # teach the concepts (intro + glossary + advice)
$ tepyd report --level expert # a terse one-line-per-finding checklist
--min-src and --exclude work as they do on the individual lenses. There is no --json: report renders prose, and the machine-readable contract lives on the lenses it wraps.
Levels¶
Every report opens with a context lead-in saying what is being measured and why. --level tunes how much it explains, never which problems it finds:
| Level | What you get |
|---|---|
newb |
Full plain-language explanation of the pyramid, every finding's what/why/fix, general advice, and a glossary. |
junior |
A shorter context, every finding's what/why/fix, and general advice. |
senior (default) |
A brief context, then each finding's what/why/fix, with no hand-holding. |
expert |
A one-line context note, then one line per finding: marker, title, action. |
Output¶
Pyramid health: FAIR — 0 problem(s), 5 warning(s) across 11 unit(s).
• Tier mix: unit 60% / integration 26% / e2e 14% (target: unit ≥ 60%)
• Shape: 11 source units, weighted test/src 0.62x, unit share 60%.
• Gaps: unit tier mirrors 8/11 source packages; 0 orphan(s).
Findings
--------
• ⚠ lenses/report: lightly tested (0.29x) — Add tests for the untested paths…
• ⚠ 3 source package(s) have no unit tests — Create the matching test packages…
The health verdict is healthy / fair / needs work, driven by the findings: any problem makes it needs work, any warning makes it fair. Findings are ordered by severity: ✗ problem, ⚠ warning, ℹ info.
When Tepyd cannot attribute your tests¶
Tepyd ties a package's tests to it by their mirrored folder. A suite organised purely by tier defeats that. Its test files are grouped by cost, so they sit in no per-package folder, and Tepyd cannot say which package any of them belongs to. The tests exist and pass; Tepyd simply cannot attribute them.
When less than half of your test code can be tied to a package, report says so at the top of the report and withholds the per-package findings, because at that attribution they would describe test layout, not missing tests:
Pyramid health: NOT ASSESSED — Tepyd could not tie your tests to the 2 source unit(s); see below.
⚠ Read this first — how Tepyd matched your tests
------------------------------------------------
Tepyd tied only 0% of your test code (0 of 120 LOC) to source packages…
Findings
--------
Withheld — Tepyd could not attribute enough of your test code to source
packages to judge them. Fix the attribution (above) and re-run.
The fix is either to group tests into package sub-folders under each tier, or to exclude the packages you test differently.
Note
This is why the verdict is not assessed rather than healthy. An empty findings list here means "could not look", not "nothing wrong".
Layer awareness¶
report inherits expects from the lenses it wraps, so its findings fire only on genuine problems. When a package looks unguarded, it points at expects as one of the fixes, so that adding ceremonial tests is not the only answer.