docs: add SDK/CLI quickstart smoke path#236
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
📝 Walkthrough
WalkthroughThis PR adds an offline smoke-test script to verify the Gradata onboarding flow without cloud credentials, and updates installation documentation to reference the script and include brain-scoped CLI verification commands. ChangesOffline Smoke Test Documentation and Implementation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 OpenGrep (1.22.0)OpenGrep fatal error (exit code 2): �[32m✔�[39m �[1mOpengrep OSS�[0m �[1m Loading rules from local config...�[0m Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Gradata/examples/offline_quickstart_smoke.py`:
- Line 49: The call to run(...) passes both "--brain-dir" and the redundant
"--brain" flag with the same value; update the invocation in
offline_quickstart_smoke.py by removing the "--brain", str(brain) argument so
the command only uses "--brain-dir" (reference the run([...]) call shown in the
diff).
🪄 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: ASSERTIVE
Plan: Pro
Run ID: eec25b8b-9ec5-43a1-b05b-1577e661b60e
📒 Files selected for processing (4)
Gradata/README.mdGradata/docs/getting-started/install.mdGradata/examples/README.mdGradata/examples/offline_quickstart_smoke.py
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: pytest macos-latest / py3.12
- GitHub Check: pytest windows-latest / py3.12
- GitHub Check: pytest ubuntu-latest / py3.12
- GitHub Check: pytest (py3.12)
- GitHub Check: pytest ubuntu-latest / py3.11
- GitHub Check: pytest macos-latest / py3.11
- GitHub Check: pytest (py3.11)
- GitHub Check: pytest windows-latest / py3.11
🔇 Additional comments (10)
Gradata/examples/offline_quickstart_smoke.py (4)
1-16: LGTM!
18-32: LGTM!
35-46: LGTM!
63-71: LGTM!Gradata/README.md (2)
106-106: LGTM!
127-132: LGTM!Gradata/docs/getting-started/install.md (2)
96-105: LGTM!
110-121: LGTM!Gradata/examples/README.md (2)
28-29: LGTM!
37-37: LGTM!
|
|
||
| run(["--help"], env=env) | ||
| run(["init", str(brain), "--domain", "Smoke", "--name", "Quickstart Smoke", "--no-interactive"], env=env) | ||
| run(["--brain-dir", str(brain), "install", "--agent", "claude-code", "--brain", str(brain), "--dry-run"], env=env) |
There was a problem hiding this comment.
Remove redundant --brain flag.
The install command includes both --brain-dir and --brain with identical values. Based on the documentation updates in this PR (README.md line 106, install.md lines 110-113), only --brain-dir is used. The --brain flag appears redundant here.
🔧 Proposed fix
- run(["--brain-dir", str(brain), "install", "--agent", "claude-code", "--brain", str(brain), "--dry-run"], env=env)
+ run(["--brain-dir", str(brain), "install", "--agent", "claude-code", "--dry-run"], env=env)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| run(["--brain-dir", str(brain), "install", "--agent", "claude-code", "--brain", str(brain), "--dry-run"], env=env) | |
| run(["--brain-dir", str(brain), "install", "--agent", "claude-code", "--dry-run"], env=env) |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Gradata/examples/offline_quickstart_smoke.py` at line 49, The call to
run(...) passes both "--brain-dir" and the redundant "--brain" flag with the
same value; update the invocation in offline_quickstart_smoke.py by removing the
"--brain", str(brain) argument so the command only uses "--brain-dir" (reference
the run([...]) call shown in the diff).
Summary
examples/offline_quickstart_smoke.pyto verify the public SDK/CLI quickstart without network credentials or real agent-config mutation--brain-dir ./my-brainto auditVerification
PYTHONPATH=src python3 examples/offline_quickstart_smoke.py→ passed, including init,install --agent claude-code --dry-run, correction, recall, stats, auditpython3 -m py_compile examples/offline_quickstart_smoke.pyPYTHONPATH=src python3 -m pytest -q tests/test_cli.py tests/test_cli_install_agent.py→ 29 passed, 2 warningsPaperclip: GRA-1781