fix(cli): code-tags --dry-run help text and capped_wide total label
--dry-run's help text now describes what it computes (the merged item→codes mapping) instead of a stale "report per-collection item/tag counts". The CLI's total line now prints capped_wide= for the per-item --max-codes-per-item cap count (the stats dict key stays skipped_wide); docs regenerated via docs/scripts/extract_cli.py.
This commit is contained in:
@@ -33,8 +33,9 @@ Usage: stack bib code-tags [OPTIONS]
|
||||
│ [default: all] │
|
||||
│ --anchors-only Rules only, straight from fr_anchors │
|
||||
│ text — skip pgvector entirely. │
|
||||
│ --dry-run Report per-collection item/tag counts; │
|
||||
│ write nothing. │
|
||||
│ --dry-run Compute the merged item→codes mapping │
|
||||
│ and report what would be tagged; write │
|
||||
│ nothing. │
|
||||
│ --max-codes-per-item INTEGER Items with more distinct codes get │
|
||||
│ family: tags only (+ hand-family │
|
||||
│ codes). │
|
||||
|
||||
@@ -925,7 +925,10 @@ def code_tags(
|
||||
help="Rules only, straight from fr_anchors text — skip pgvector entirely.",
|
||||
),
|
||||
dry_run: bool = typer.Option(
|
||||
False, "--dry-run", help="Report per-collection item/tag counts; write nothing."
|
||||
False,
|
||||
"--dry-run",
|
||||
help="Compute the merged item→codes mapping and report what would "
|
||||
"be tagged; write nothing.",
|
||||
),
|
||||
max_codes_per_item: int = typer.Option(
|
||||
200,
|
||||
@@ -1025,5 +1028,5 @@ def code_tags(
|
||||
prefix = "would-" if dry_run else ""
|
||||
typer.echo(
|
||||
f"total: {prefix}items={stats['items']} {prefix}tags_added={stats['tags_added']} "
|
||||
f"skipped_wide={stats['skipped_wide']}"
|
||||
f"capped_wide={stats['skipped_wide']}"
|
||||
)
|
||||
|
||||
@@ -439,7 +439,7 @@ class TestCodeTags:
|
||||
|
||||
assert result.exit_code == 0, result.output
|
||||
assert "comments: skipped (--anchors-only)" in result.output
|
||||
assert "total: items=0 tags_added=0 skipped_wide=0" in result.output
|
||||
assert "total: items=0 tags_added=0 capped_wide=0" in result.output
|
||||
mc_anchors.assert_not_called()
|
||||
mc_chunks.assert_not_called()
|
||||
mc_apply.assert_not_called()
|
||||
|
||||
Reference in New Issue
Block a user