# Dev / test dependencies for working ON OKEngine. See CONTRIBUTING.md.
#
# Enough to run the OFFLINE test suite. Two test groups self-skip
# (pytest.importorskip) when their deps are absent, so the extra blocks below
# UNLOCK them rather than being strictly required:
#   - reader tests (tests/test_reader_browse.py) import okengine-reader/app.py
#   - extractor tests (tests/test_extract_docs.py) exercise the doc backends
# MCP-server tests still self-skip without `mcp` — add okengine-mcp/requirements.txt.
#
# Versions are bounded (>=,<next-major) for reproducibility (okengine#58): a lower
# floor for features + an upper cap so a surprise upstream major can't break CI/local
# out from under us. Bump caps deliberately.

# core
pytest>=8,<10
pytest-timeout>=2.3,<3
defusedxml>=0.7.1,<0.8  # safe JUnit parser for the Hermes target contract gate
hypothesis>=6.100,<7
cosmic-ray>=8.4,<9
pyyaml>=6,<7
croniter>=6,<7
ruff>=0.6,<0.13

# static analysis + supply-chain checks (make audit / coverage / typecheck — okengine#54/#56/#57)
pip-audit>=2.7,<3
bandit>=1.7,<2
pytest-cov>=5,<7
mypy>=1.11,<2
types-PyYAML>=6.0,<7
playwright>=1.55,<2

# projection-service tests (okengine#600) — tests/test_projection_service_paths.py specs its
# connection double against the REAL asyncpg.Connection with create_autospec, so a renamed or
# dropped method fails at the double instead of leaving the tests green against a contract that
# no longer exists. No server is contacted here; the live-PostgreSQL contract stays in the
# postgres-projection-integration job. Bounded rather than matching the runtime's exact ==0.30.0
# because that release has no wheel for the 3.14 interpreter used locally, while CI runs 3.12.
asyncpg>=0.30,<1

# reader tests — app.py's top-level imports (NOT weasyprint; it's lazy, PDF-only)
fastapi>=0.115,<1
nh3>=0.3,<0.4
markdown>=3.7,<4

# document-extractor tests — the python backends (overlaps requirements-extract.txt
# minus the optional trafilatura; system tools poppler-utils/antiword aren't pip)
python-docx>=1.1,<2
python-pptx>=0.6.23,<2
openpyxl>=3.1,<4
striprtf>=0.0.26,<0.1
