Summary
Running wily report <file> with no metric arguments prints a table containing only Revision, Author, Date — no metric columns at all. The docs state: "By default, wily will show all available metrics."
Environment
- wily
2.0.0a2 (v2 / master @ cd768bb), backend 2.0.0-alpha.2
- Python 3.12, Windows 11 ARM64
- Test repo:
microsoft/graphrag
Steps to reproduce
> wily --path <graphrag> report packages/graphrag/graphrag/index/utils/derive_from_rows.py
Actual
┌──────────┬───────────────┬────────────┐
│ Revision │ Author │ Date │
├──────────┼───────────────┼────────────┤
│ 5fd2dd7 │ Anthony Shaw │ 2026-05-17 │
│ 6f26d0e │ Dayenne Souza │ 2026-02-27 │
└──────────┴───────────────┴────────────┘
Passing metrics explicitly works fine:
> wily ... report .../derive_from_rows.py raw.loc cyclomatic.complexity # shows metric columns
Expected
With no metrics specified, wily report shows all available metrics (per the docs).
Root cause
The metrics argument is declared with nargs=-1 in src/wily/__main__.py, so when omitted Click passes an empty tuple (), not None. But src/wily/commands/report.py only falls back to ALL_METRICS when metrics is None:
if metrics is None:
resolved_metrics = ALL_METRICS
else:
metrics = sorted(set(metrics)) # () -> []
resolved_metrics = [...] # [] -> no metric columns
So the empty tuple takes the else branch and yields zero metrics.
Suggested fix
Treat an empty collection the same as None, e.g. if not metrics: resolved_metrics = ALL_METRICS. (Note: once fixed, default report will display all ~20 metric columns; consider a sensible default subset or wide-table handling — see the related wily diff wide-table issue.)
Summary
Running
wily report <file>with no metric arguments prints a table containing onlyRevision,Author,Date— no metric columns at all. The docs state: "By default, wily will show all available metrics."Environment
2.0.0a2(v2 /master@cd768bb), backend2.0.0-alpha.2microsoft/graphragSteps to reproduce
> wily --path <graphrag> report packages/graphrag/graphrag/index/utils/derive_from_rows.pyActual
Passing metrics explicitly works fine:
> wily ... report .../derive_from_rows.py raw.loc cyclomatic.complexity # shows metric columnsExpected
With no metrics specified,
wily reportshows all available metrics (per the docs).Root cause
The
metricsargument is declared withnargs=-1insrc/wily/__main__.py, so when omitted Click passes an empty tuple(), notNone. Butsrc/wily/commands/report.pyonly falls back toALL_METRICSwhenmetrics is None:So the empty tuple takes the
elsebranch and yields zero metrics.Suggested fix
Treat an empty collection the same as
None, e.g.if not metrics: resolved_metrics = ALL_METRICS. (Note: once fixed, default report will display all ~20 metric columns; consider a sensible default subset or wide-table handling — see the relatedwily diffwide-table issue.)