pyproject.toml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. [project]
  2. name = "cfc-langgraph"
  3. version = "0.1.0"
  4. description = "cfc AI sidecar service with LangGraph"
  5. requires-python = ">=3.11"
  6. dependencies = [
  7. "fastapi>=0.115",
  8. "uvicorn[standard]>=0.34",
  9. "pydantic>=2.10",
  10. "pydantic-settings>=2.7",
  11. "httpx>=0.28",
  12. "langchain>=0.3,<1.0",
  13. "langchain-community>=0.3,<1.0",
  14. "langchain-openai>=0.3,<1.0",
  15. "langgraph>=0.3,<1.0",
  16. "chromadb==0.5.23",
  17. "langchain-chroma==0.1.4",
  18. "python-multipart>=0.0.20",
  19. "prometheus-client>=0.21",
  20. "faster-whisper==1.2.1",
  21. "av==18.1.0",
  22. ]
  23. [project.optional-dependencies]
  24. dev = [
  25. "pytest>=8",
  26. "pytest-asyncio>=0.25",
  27. "ruff>=0.8",
  28. "httpx",
  29. ]
  30. [tool.ruff]
  31. target-version = "py311"
  32. line-length = 100
  33. select = ["E", "F", "I", "N", "W"]
  34. ignore = ["E501"]
  35. [tool.pytest.ini_options]
  36. # pytest-asyncio 1.x 要求显式 loop scope;B-74 修复(2026-11-09):
  37. # session 级 autouse async fixture(conftest._init_checkpointer_global)需
  38. # session/auto 默认 loop scope 方能初始化 checkpointer 并无缝复用于全部测试。
  39. asyncio_mode = "auto"
  40. asyncio_default_fixture_loop_scope = "session"
  41. # B-117 修复:仅设 fixture loop scope 不够;测试函数本身默认 function scope,
  42. # 与 session-scoped checkpointer 跨 loop,触发 "Lock bound to different event loop"。
  43. # 将测试 loop 也提升到 session,让所有 async 测试共享同一事件循环,避免 AsyncSqliteSaver
  44. # 内部 Condition/Lock 绑定失效。
  45. asyncio_default_test_loop_scope = "session"