feat(cli): add --verbose to reindex quiet logging#932
Conversation
Wire reindex to configure_cli_logging so progress bars stay clean by default, matching init/update. Part of repowise-dev#930. Signed-off-by: Solaris-star <820622658@qq.com>
|
✅ Health: 7.5 (unchanged) 📋 At a glance Files & modules (2)
🗺️ Change map flowchart LR
subgraph PR ["Changed in this PR (1 with dependents)"]
f_packages_cli_src_repowise_cli_commands_reindex_cmd_py[".../commands/reindex_cmd.py 🔥"]:::changed
end
f_packages_cli_src_repowise_cli_main_py[".../cli/main.py"]
f_packages_cli_src_repowise_cli_commands_reindex_cmd_py --> f_packages_cli_src_repowise_cli_main_py
f_packages_cli_src_repowise_cli_upgrade_py[".../cli/upgrade.py"]
f_packages_cli_src_repowise_cli_commands_reindex_cmd_py --> f_packages_cli_src_repowise_cli_upgrade_py
classDef changed fill:#dbeafe,stroke:#1d4ed8,color:#1e3a5f
classDef warn fill:#fef3c7,stroke:#b45309,color:#78350f
classDef guard fill:#dcfce7,stroke:#15803d,color:#14532d
Solid arrows: code that imports the changed files (2 direct dependents, from the last indexed snapshot). Dashed: history/tests. 🩹 Review priority (files here with the most recent bug-fix history — defects cluster, so review these first)
🔎 More signals (1)🔥 Hotspot touched (1)
📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-19 15:47 UTC |
RaghavChamadiya
left a comment
There was a problem hiding this comment.
Thanks for kicking this off. Three things before merge:
- The test calls
reindex_command.callback(...)directly, which bypasses Click. It would pass even if the@click.option("--verbose", "-v", ...)decorator were deleted, so it is not covering the thing the PR adds. Please go throughCliRunner().invoke(cli, ["reindex", ..., "-v"])instead, and assert the quiet default too. #942 and #943 show the shape. docs/CLI_REFERENCE.mdneeds the flag added to therepowise reindexoptions table (around line 897). The other PRs on this issue all do this and I would like it consistent.ruff formatreformatstests/unit/cli/test_reindex_cmd.py. Please runruff format ..
Minor: verbose: bool = False in the signature is redundant since Click always passes the flag. Match update_cmd's spelling.
Summary
--verbose/-vtorepowise reindex, wired toconfigure_cli_logging(same helper asinit/update)configure_cli_loggingbefore pipeline workRelated Issues
Part of #930 (reindex slice only; other commands left for follow-ups as the issue suggests)
Test Plan
pytest tests/unit/cli/test_reindex_cmd.py(2 passed)ruff check .) (not run full tree this PR)Checklist