Repository navigation
Commit 46cd8c5
build: declare directly-imported deps, drop the dead root eval extra (#208)
Follow-up to #197, from auditing every module-level third-party import in
the shipped packages against what the extras declare. Three of them were
not declared where their importer lives.
**aiohttp — a real break, not tidying.** zim_server_async.py does
`from aiohttp import web` at module scope, but aiohttp was declared only
in the root `eval` extra. So the documented invocation in its own
docstring (`python -m pixelrag_serve.zim_server_async --zim ... --port`)
failed after `pip install 'pixelrag[kiwix]'`:
File ".../pixelrag_serve/zim_server_async.py", line 16, in <module>
from aiohttp import web
ModuleNotFoundError: No module named 'aiohttp'
It belongs with libzim in `kiwix`: that module imports both, and the sync
zim_server.py needs only libzim, so `[kiwix]` now covers both servers.
**botocore.** index/distributed.py imports botocore.exceptions directly
while only boto3 was declared. boto3 always pulls botocore in, so nothing
was broken — but a direct import belongs in the declaration.
**pandas (eval/).** eval/lib/benchmarks.py and simpleqa_data.py import
pandas directly; it reached eval's venv only transitively through
datasets. Declared in eval/pyproject.toml, where those files live.
**Dropped the root `eval` extra.** Nothing in the repo references
`pixelrag[eval]` or `--extra eval`, and it could not run the harness
anyway: eval imports requests and tqdm at module scope and the extra
listed neither. eval/ is its own uv project (pixelrag-repro) and
eval/README documents `uv sync --frozen` from inside it, so the extra was
a stale duplicate — and the only place aiohttp was declared, which is how
the gap above hid. It is a user-facing removal of an extra that never
worked.
Verified per extra in fresh `uv run --isolated` envs: `[kiwix]` now
imports zim_server_async cleanly (it raised ModuleNotFoundError on main),
`[distributed]` imports index/distributed.py, and the suite is 298 passed
/ 2 skipped. The other extras are backed by real imports and untouched —
playwright (strategies/connection.py), pdf (pdf2image in backends/pdf.py),
qdrant, embed, serve, gpu.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 08456eb commit 46cd8c5
4 files changed
Lines changed: 33 additions & 565 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
66 | 62 | | |
67 | 63 | | |
68 | 64 | | |
| |||
0 commit comments