Skip to content

Add -v/--verbose flag to repowise export#934

Closed
Narasimha2211 wants to merge 1 commit into
repowise-dev:mainfrom
Narasimha2211:feat/export-verbose-flag
Closed

Add -v/--verbose flag to repowise export#934
Narasimha2211 wants to merge 1 commit into
repowise-dev:mainfrom
Narasimha2211:feat/export-verbose-flag

Conversation

@Narasimha2211

Copy link
Copy Markdown

Summary

#929 made init/update quiet by default via configure_cli_logging(), scoped to just those two commands. This wires the same -v flag into export, one command off the remaining-commands list in #930.

reindex was already claimed by another contributor when I picked this up — the issue explicitly calls out that picking a single command is a reasonable scope for one PR ("This is splittable... Picking a single command off this list is a reasonable first contribution").

Changes

  • export_cmd.py: adds --verbose/-v, calls configure_cli_logging(verbose=verbose) as the first statement in the command body (matching the update_cmd reference call site), following the exact pattern from the issue.
  • tests/unit/cli/test_export_cmd.py: asserts the flag reaches configure_cli_logging with the right value, both with and without -v.

How I tested this

  • pytest tests/unit/cli/test_export_cmd.py -v — 2 passed
  • Full pytest tests/unit/cli/ — 804 passed (no regressions)
  • ruff check / ruff format --diff on changed files — clean

Related issue

Part of #930 (export command only; other commands on that list are left for follow-up PRs, per the issue's own suggestion).

repowise-dev#929 made init/update quiet by default via configure_cli_logging(),
scoped to just those two commands. This wires the same -v flag into
`export`, one command off the remaining-commands list in repowise-dev#930 (picking
a single command is called out there as a reasonable scope for one PR;
`reindex` was already claimed by another contributor when I picked
this up).

Adds tests/unit/cli/test_export_cmd.py asserting the flag reaches
configure_cli_logging with the right value, both with and without -v.

Part of repowise-dev#930 (export command only; other commands on that list are
left for follow-up PRs, as the issue suggests).
Copilot AI review requested due to automatic review settings July 19, 2026 16:17
@repowise-bot

repowise-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown

✅ Health: 7.5 (unchanged)

📋 At a glance
1 hotspot touched · 2 new findings introduced. Scoped to packages.

🗺️ Change map

flowchart LR
  subgraph PR ["Changed in this PR (1 with dependents)"]
    f_packages_cli_src_repowise_cli_commands_export_cmd_py[".../commands/export_cmd.py 🔥"]:::changed
  end
  f_packages_cli_src_repowise_cli_main_py[".../cli/main.py"]
  f_packages_cli_src_repowise_cli_commands_export_cmd_py --> f_packages_cli_src_repowise_cli_main_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 (1 direct dependent, from the last indexed snapshot). Dashed: history/tests.

🔎 More signals (1)

🔥 Hotspot touched (1)

  • .../commands/export_cmd.py — 0 commits/90d, 1 dependents · primary owner: Raghav Chamadiya (100%)

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the quiet-by-default CLI logging work from #929 to repowise export by adding a --verbose/-v flag and wiring it into configure_cli_logging(verbose=...), with a unit test ensuring the flag value is passed through.

Changes:

  • Add --verbose/-v option to repowise export and call configure_cli_logging(verbose=verbose) at the start of the command.
  • Add unit tests asserting configure_cli_logging receives True with -v and False by default.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/cli/src/repowise/cli/commands/export_cmd.py Adds --verbose/-v and configures CLI logging at the start of export.
tests/unit/cli/test_export_cmd.py Adds unit coverage ensuring the verbose flag is forwarded to configure_cli_logging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +19 to +23
def _init_empty_db(repo_path):
"""Create the wiki DB schema, mirroring what `repowise init` would do."""
ensure_repowise_dir(repo_path)
engine = create_engine(get_db_url_for_repo(repo_path))
asyncio.run(init_db(engine))
@RaghavChamadiya

Copy link
Copy Markdown
Member

Closing as a duplicate: @Solaris-star claimed export on #930 a few minutes before this opened, and #933 covers the same ground. No reflection on the work, your test is the better of the two, and I have asked #933 to adopt its shape with credit to you.

Sorry for the collision. augment is the one row in the issue table nobody has claimed yet if you want it, and dropping a claim comment on #930 first will avoid a repeat.

Solaris-star added a commit to Solaris-star/repowise that referenced this pull request Jul 24, 2026
Route the verbose-flag test through CliRunner().invoke() instead of
.callback() so it actually exercises the Click decorator (repowise-dev#932).
Add --verbose/-v to the reindex options table in CLI_REFERENCE.md.

Co-authored-by: Narasimha2211 (test shape from repowise-dev#934)
Solaris-star added a commit to Solaris-star/repowise that referenced this pull request Jul 24, 2026
Route the verbose-flag test through CliRunner().invoke() instead of
.callback() so it actually exercises the Click decorator (repowise-dev#933).
Add --verbose/-v to the export options table in CLI_REFERENCE.md.

Co-authored-by: Narasimha2211 (test shape from repowise-dev#934)
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.

3 participants