Skip to content

Commit 041050c

Browse files
docs(doccano-django): split run section into smoke / coverage / keploy modes
Signed-off-by: Akash Kumar <meakash7902@gmail.com>
1 parent bc39d9d commit 041050c

1 file changed

Lines changed: 44 additions & 14 deletions

File tree

doccano-django/README.md

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,58 @@ that:
5050

5151
## Running locally
5252

53+
### Without keploy — smoke check
54+
5355
```sh
54-
# Bring doccano up + bootstrap the admin token (one-shot; the volume
55-
# is reused for the actual record run).
5656
docker compose up -d
5757
./flow.sh bootstrap
58+
./flow.sh record-traffic
59+
docker compose down -v
60+
```
5861

59-
# Record
60-
keploy record \
61-
-c "docker compose up" \
62-
--container-name doccano_backend \
63-
--proxy-port 18081 --dns-port 18082
62+
This is what the keploy/integrations and keploy/enterprise CI
63+
lanes wrap in `keploy record` / `keploy test` — the base compose
64+
is uninstrumented and runs unchanged inside those lanes.
65+
66+
### Without keploy — measuring real Python line coverage
6467

65-
# (in another shell, while keploy record is up)
68+
The base image is uninstrumented. Apply the coverage overlay to
69+
add `coverage.py` per-worker tracking:
70+
71+
```sh
72+
mkdir -p coverage
73+
docker compose -f docker-compose.yml -f docker-compose.coverage.yml up -d --build
74+
./flow.sh bootstrap
6675
./flow.sh record-traffic
67-
# → SIGINT keploy when traffic returns
76+
docker compose -f docker-compose.yml -f docker-compose.coverage.yml kill -s SIGTERM backend
77+
sleep 3
78+
docker compose -f docker-compose.yml -f docker-compose.coverage.yml up -d backend
79+
./flow.sh coverage
80+
docker compose -f docker-compose.yml -f docker-compose.coverage.yml down -v
81+
```
6882

69-
# Replay
70-
keploy test \
71-
-c "docker compose up" \
72-
--containerName doccano_backend \
73-
--apiTimeout 60 --delay 20 \
83+
The overlay (`Dockerfile.coverage` + `docker-compose.coverage.yml`)
84+
adds `coverage[toml]` and a `coverage_subprocess.pth` so each
85+
gunicorn worker auto-starts coverage tracking. It is consumed
86+
ONLY by the standalone GH Actions workflow — keploy CI lanes
87+
ignore it and run the base compose, paying zero coverage cost.
88+
89+
### With keploy — record + replay
90+
91+
```sh
92+
docker compose up -d
93+
./flow.sh bootstrap
94+
95+
# In one shell:
96+
keploy record -c "docker compose up" --container-name doccano_backend \
7497
--proxy-port 18081 --dns-port 18082
98+
99+
# In another shell:
100+
./flow.sh record-traffic
101+
# SIGINT keploy when traffic returns
102+
103+
keploy test -c "docker compose up" --containerName doccano_backend \
104+
--apiTimeout 60 --delay 20 --proxy-port 18081 --dns-port 18082
75105
```
76106

77107
Expected outcome with the integrations fix in place: 0 failures,

0 commit comments

Comments
 (0)