Skip to content

Commit 958f8c7

Browse files
committed
README update: added dev quick-start-guide.
1 parent a18bd6b commit 958f8c7

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,45 @@ Tesseract OCR and its dependencies.
3232

3333
Windows: run inside WSL (preferably Ubuntu). Native Windows paths are not maintained; install dependencies from the Dockerfile.
3434

35+
## Development quick start
36+
37+
Run these commands from the repository root:
38+
39+
```bash
40+
# 1) Create and activate a virtual environment
41+
python3 -m venv .venv
42+
source .venv/bin/activate
43+
44+
# 2) Install app + dev dependencies
45+
pip install -r requirements.txt
46+
pip install -r requirements-dev.txt
47+
48+
# 3) Start service in debug/development mode
49+
# (loads defaults from ./env/ocr_service.env)
50+
bash start_service_debug.sh
51+
```
52+
53+
In a second terminal, verify the service:
54+
55+
```bash
56+
curl -fsS http://127.0.0.1:8090/api/health
57+
curl -fsS http://127.0.0.1:8090/api/ready
58+
curl -fsS http://127.0.0.1:8090/api/info
59+
```
60+
61+
Useful development commands:
62+
63+
```bash
64+
# Lint
65+
ruff check .
66+
67+
# Type check
68+
mypy .
69+
70+
# Tests
71+
python3 -m unittest discover -s ocr_service/tests -p 'test_*.py'
72+
```
73+
3574
## Starting the service
3675

3776
Docker (prebuilt image): `cd docker && docker compose -f docker-compose.base.yml up -d` (or `docker-compose`)

0 commit comments

Comments
 (0)