Repository navigation
cli docs - #589
cli docs#589
Conversation
|
Caution Review failedPull request was closed or merged during review WalkthroughThis PR adds comprehensive CLI documentation for the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
honcho-cli/scripts/generate_cli_docs.py (1)
49-124: Add Google-style docstrings for the remaining functions.
_format_param,_render,build, andmainare currently undocumented.As per coding guidelines "Use Google style docstrings".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@honcho-cli/scripts/generate_cli_docs.py` around lines 49 - 124, Add Google-style docstrings to the undocumented functions: _format_param(param: click.Parameter) -> str, _render(cmd: click.Command, path: list[str]) -> list[str], build() -> str, and main() -> int. For each function add a concise one-line summary, an Args section documenting parameters and their types (e.g., param, cmd, path), a Returns section with the return type and description, and a Raises section where applicable (e.g., build raising SystemExit). Keep docstrings in Google style, placed immediately under each function signature, and ensure private helpers (_format_param, _render) still follow the same format.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/snippets/cli-commands.mdx`:
- Around line 1-5: The committed generated snippet in
docs/snippets/cli-commands.mdx is out of date; re-run the generator and commit
the updated output by executing the generator
(honcho-cli/scripts/generate_cli_docs.py) with the same flags used in CI (e.g.
run generate_cli_docs.py or run the project's recommended command: uv run
--package honcho-cli python honcho-cli/scripts/generate_cli_docs.py), verify the
file is updated, and commit the regenerated docs; if you want to confirm
consistency locally, run generate_cli_docs.py --check and fix any differences by
re-generating from the source commands in honcho-cli/src/honcho_cli/commands/
before committing.
In `@honcho-cli/scripts/generate_cli_docs.py`:
- Around line 86-88: The doc generator is including hidden commands because the
iteration in _render over cmd.commands and the root-level loop in build do not
check the ClickCommand.hidden flag; update the code in _render (where it loops
over cmd.commands) to skip entries where cmd.commands[sub_name].hidden is True
and likewise filter out hidden commands when build iterates root-level commands
so hidden=True commands are not rendered; additionally add Google-style
docstrings to the functions _format_param, _render, build, and main describing
purpose, args, and returns to meet coding guidelines.
---
Nitpick comments:
In `@honcho-cli/scripts/generate_cli_docs.py`:
- Around line 49-124: Add Google-style docstrings to the undocumented functions:
_format_param(param: click.Parameter) -> str, _render(cmd: click.Command, path:
list[str]) -> list[str], build() -> str, and main() -> int. For each function
add a concise one-line summary, an Args section documenting parameters and their
types (e.g., param, cmd, path), a Returns section with the return type and
description, and a Raises section where applicable (e.g., build raising
SystemExit). Keep docstrings in Google style, placed immediately under each
function signature, and ensure private helpers (_format_param, _render) still
follow the same format.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fd90ef03-42d0-445e-822d-7143f74c2cf8
📒 Files selected for processing (5)
.github/workflows/cli-docs.ymldocs/docs.jsondocs/snippets/cli-commands.mdxdocs/v3/documentation/reference/cli.mdxhoncho-cli/scripts/generate_cli_docs.py
* docs: adding cli doc * docs: adding generated script and content and github workflow * chore: removing workflow * fix: (docs) re-format and add details to cli-reference docs --------- Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
Summary by CodeRabbit