Add CLI command 'bibra run' for server mode - #107
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
==========================================
+ Coverage 98.50% 98.52% +0.01%
==========================================
Files 13 13
Lines 536 543 +7
==========================================
+ Hits 528 535 +7
Misses 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds a first-class CLI entry point for running BIBRA in “server mode” (API + Web UI), replacing the previously documented direct uvicorn invocation and aligning with the request in issue #103.
Changes:
- Add a new
bibra runClick subcommand that startsuvicornwith configurable host/port and optional--reload. - Add unit tests verifying the new command’s help output and that it forwards options to
uvicorn.run. - Update README usage instructions to start the server via
uv run bibra run.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
bibra/cli.py |
Introduces the run CLI subcommand that starts bibra.main:app via uvicorn.run. |
tests/test_cli.py |
Adds coverage for the new run command and updates CLI help assertions. |
README.md |
Updates server startup instructions to use bibra run (with --reload guidance). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Reasons for creating this PR
A dedicated command to serve the API and web UI is handy.
Link to relevant issue(s), if any
Description of the changes in this PR
uv run bibra runor justbibra runwhen in venv.uv run uvicorn bibra.main:app.Instructions how to test this PR
Run
uv run bibra runwith various flags.Known problems or uncertainties in this PR
What should the name of the command be?
Now the usage is
bibra run, but wouldbibra servebe better? Especiallyuv run bibra runis a bit awkward.Checklist
Disclosure of AI Tool Usage
Please indicate AI use by choosing the most suitable TLP:AI category below and removing the irrelevant categories from the list. AI:ORANGE is the minimum level for merging.
Describe the AI tool(s) you used:
Zoo Code with Qwen3.8-27B