# ============================================================ # APS 智能体 · Python 后端工程定义(moduleId: root-pyproject, 可重生 ✅) # 全栈 Python 已决策(plan.md §11.1):Gateway + Agent Core 同栈 # ============================================================ [project] # 项目名:与仓库同名,便于识别 name = "aps-agent-server" # 版本:语义化版本,M1 里程碑为 0.1.x version = "0.1.0" # 描述:一句话说明后端职责 description = "APS 计划排产智能体后端:FastAPI Gateway + Agent Core + 规则排产引擎" # Python 版本要求:3.11+(本机 3.13 已验证) requires-python = ">=3.11" # 运行时依赖:全部为 M0+M1 必需,不引入未用包 dependencies = [ "fastapi>=0.115", # Web 框架:HTTP API + SSE 会话流 "uvicorn[standard]>=0.30", # ASGI 服务器:开发与生产运行入口 "httpx>=0.27", # 异步 HTTP 客户端:调用 DeepSeek/KIMI OpenAI 兼容接口 "pydantic>=2.7", # 数据契约:意图/UI块/命令的强校验(shared/ Schema 的运行时形态) "python-dotenv>=1.0", # .env 加载:LLM 密钥等环境配置(密钥不入库) "ortools>=9.10", # SC-03:OR-Tools CP-SAT ] [project.optional-dependencies] # 开发依赖:测试与质量工具 dev = [ "pytest>=8.0", # 黄金测试运行器(tests/golden) "pytest-asyncio>=0.23", # 异步用例支持(意图管线测试) ] [tool.pytest.ini_options] # 测试根目录:仅收集 tests/ 下用例 testpaths = ["tests"] # 让 pytest 能以仓库根为工作目录导入 server 包 pythonpath = ["."] # 异步用例默认事件循环策略 asyncio_mode = "auto"