conandeps: render missing binaries and overrides as colour-coded tables

All three sections (dependencies, missing binaries, overrides) now use the
same column-aligned table layout in both the text and the HTML report. The
text report gets ANSI colour on a terminal (green remote, red missing,
yellow cache-only/overridden) via --color auto|always|never, honouring
NO_COLOR; the table helper aligns on visible width so colour codes never
break columns. Every state is still spelled out in words so nothing is
conveyed by colour alone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
This commit is contained in:
Ole-Morten Duesund 2026-08-25 15:19:22 +02:00
commit 857500f20e
4 changed files with 220 additions and 85 deletions

View file

@ -60,6 +60,11 @@ for what it does and how it is used.
header makes the file usable via `uv run conandeps.py` without a checkout.
- **Exit codes:** `0` fine, `1` missing binaries, `2` Conan error. CI relies
on this.
- **Tables and colour, consistently.** Dependencies, missing binaries and
overrides are all rendered through the same `_table()` helper (text) and
`_html_table()` (HTML). Colour is an aid only every state is also spelled
out in words and `_table()` aligns on *visible* width so ANSI codes never
break columns. `--color auto` is the default (terminal + no `NO_COLOR`).
- **stdout is the report, stderr is progress.** Graph resolution against a
remote takes a while; progress lines (`_progress`) and `--verbose` live
Conan output go to stderr only, so stdout can be redirected to a file.