Skip to content

feat(cli): add --verbose to reindex quiet logging#932

Open
Solaris-star wants to merge 1 commit into
repowise-dev:mainfrom
Solaris-star:feat/reindex-verbose-logging
Open

feat(cli): add --verbose to reindex quiet logging#932
Solaris-star wants to merge 1 commit into
repowise-dev:mainfrom
Solaris-star:feat/reindex-verbose-logging

Conversation

@Solaris-star

Copy link
Copy Markdown

Summary

  • Add --verbose / -v to repowise reindex, wired to configure_cli_logging (same helper as init / update)
  • Default stays quiet so Rich progress bars are not flooded by library/structlog debug lines
  • Unit test asserts the flag reaches configure_cli_logging before pipeline work

Related 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)
  • Lint passes (ruff check .) (not run full tree this PR)
  • Web build N/A

Checklist

  • My code follows the project's code style
  • I have added tests for new functionality
  • Existing reindex tests still pass
  • Documentation N/A (flag help text added on the option)

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>
@repowise-bot

repowise-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown

✅ Health: 7.5 (unchanged)

📋 At a glance
1 hotspot touched · 2 files with recent fix history.

Files & modules (2)
  • packages (1 file)
    • .../commands/reindex_cmd.py
  • tests (1 file)
    • .../cli/test_reindex_cmd.py

🗺️ 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
Loading

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)

  • .../commands/reindex_cmd.py — 5 commits/90d, 3 dependents · primary owner: Raghav Chamadiya (65%)

📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-19 15:47 UTC
Silence on a single PR with [skip repowise] in the title · Per-repo toggle on repowise.dev/settings?tab=bot

@RaghavChamadiya RaghavChamadiya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for kicking this off. Three things before merge:

  1. 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 through CliRunner().invoke(cli, ["reindex", ..., "-v"]) instead, and assert the quiet default too. #942 and #943 show the shape.
  2. docs/CLI_REFERENCE.md needs the flag added to the repowise reindex options table (around line 897). The other PRs on this issue all do this and I would like it consistent.
  3. ruff format reformats tests/unit/cli/test_reindex_cmd.py. Please run ruff format ..

Minor: verbose: bool = False in the signature is redundant since Click always passes the flag. Match update_cmd's spelling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants