chore: add summarizer bootstrap test script
This commit is contained in:
@@ -30,9 +30,29 @@ pip install -r requirements.txt
|
||||
python -m uvicorn app:app --host 127.0.0.1 --port 8001 --workers 1
|
||||
```
|
||||
|
||||
If the host is missing `python3-venv` or `pip`, use the bootstrap script instead:
|
||||
|
||||
```bash
|
||||
./scripts/bootstrap-and-test.sh bootstrap
|
||||
```
|
||||
|
||||
## Docker
|
||||
The Dockerfile installs Tesseract OCR so scanned PDFs and supported images can be processed inside the container.
|
||||
|
||||
## Tests
|
||||
|
||||
Run the summarizer unit tests with:
|
||||
|
||||
```bash
|
||||
./scripts/bootstrap-and-test.sh test
|
||||
```
|
||||
|
||||
The script:
|
||||
- creates `.venv` with stdlib `venv` when available
|
||||
- falls back to user-space `virtualenv` when host `venv` support is missing
|
||||
- installs `requirements-dev.txt`
|
||||
- writes pytest cache under `tmp/pytest-cache` to avoid stale root-owned `.pytest_cache` directories
|
||||
|
||||
## API
|
||||
- `GET /health` — health check and runtime capabilities, including Ollama version/model metadata when configured
|
||||
- `POST /summarize` — JSON body `{ "text": "...", "max_length": 150, "min_length": 30 }`
|
||||
|
||||
Reference in New Issue
Block a user