Files
group_fqcd_jr/requirements.txt
T
lzf_0626 f09ea9e988 Merge origin/NL_develop:客服画像出口、知识管理三端点、合规语境与知识向量链路
NL 线(含其并入的袁聪场外/推广域)。唯一冲突是 .gitignore —— 双方都往同一区域加了
.workdir/,取对方版本(他的更完整,含 .tmp/ 与说明),顺带修掉我之前用
Add-Content -Encoding utf8 造成的编码混合(read 工具当时报 invalid UTF-8)。

合并后修的问题 —— 都不是"改别人业务逻辑",是让门禁能绿:

1. 缺运行依赖 python-docx。document_parser.py 解析 .docx 用它,但 requirements.txt 与
   pyproject.toml 都没声明 —— 别人环境跑知识入库会直接
   ModuleNotFoundError: No module named 'docx'。已补声明。
2. ruff 7 项:其中 tests/conftest.py 的 F821 Undefined name 'Path'(他的 tmp_path 修复
   写了字符串注解 "Path" 却漏 import,运行时不求值所以没炸,但 mypy/ruff 会抓)、
   tools/publish_customer_service_config.py 的 F841 inherited_keys 死变量(他改同 key
   覆盖、换成 inherited_only 后忘删旧的)、3 处 E501,另 2 项 ruff --fix 自动修复。
3. 合规基线种子未跑:integration 的 test_compliance_seed_mysql 4 个用例要求
   agent_negative_word 有 7 条 active 且已复核、agent_reply_template 覆盖 6 场景。
   跑 tools/seed_compliance_baseline.py(11 条 active 规则 / 6 个场景模板)后 80 passed。

验证:ruff 干净 / mypy 180 文件 0 错 / unit+contract 1140 passed /
integration 80 passed / 表数 68(alembic 已在 20260911_merge_risk_heads)。

唯一失败 tests/unit/repository/test_fund_readonly_contract.py 是双方一致的既有缺陷:
它断言 Base.metadata 里的 fin_* 表集合,而实测为空集 —— 即该测试依赖别的测试先导入模型的
副作用,单独跑必失败。NL 方也明确"不修不报",此处照办,仅记录。
2026-09-11 20:22:59 +08:00

50 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Runtime dependencies (source of truth: pyproject.toml)
fastapi>=0.115,<1
uvicorn[standard]>=0.34,<1
pydantic>=2.10,<3
pydantic-settings>=2.7,<3
python-dotenv>=1.0,<2
sqlalchemy>=2.0,<3
greenlet>=3.1,<4
alembic>=1.14,<2
asyncmy>=0.2,<1
pymysql>=1.1,<2
redis>=5.2,<6
neo4j>=5.28,<6
pymilvus>=2.5,<3
PyJWT>=2.10,<3
cryptography>=44,<51
httpx>=0.28,<1
tzdata>=2025.1,<2027
openai>=1.0,<2
alibabacloud_docmind_api20220711==1.4.14
alibabacloud_tea_openapi>=0.4.3,<1
alibabacloud_tea_util>=0.3.13,<1
alibabacloud_credentials>=1.0.2,<2
# 产品推介材料生成依赖
# - python-pptx:生成固定版式 PPTX
# - openpyxl:读取 XLSX/XLSM 业绩数据文件
# - Pillow:校验上传照片并生成宣传长图 PNG
# - matplotlib:生成业绩曲线 PNG
# - python-multipart:支持 FastAPI 文件上传
# PDF 导出还需要部署机安装 LibreOffice/soffice,并在 .env 中配置
# PROMOTION_PDF_ENABLED/PROMOTION_PDF_CONVERTER_PATH;它不是 pip 依赖。
# 中文渲染还需要部署机存在微软雅黑、黑体、Noto Sans CJK 或文泉驿等中文字体。
python-pptx>=1.0,<2
openpyxl>=3.1,<4
Pillow>=10,<12
matplotlib>=3.9,<4
python-multipart>=0.0.20,<1
# 知识库文档解析依赖
# - python-docx:解析上传的 .docx 知识文档(app/service/document_parser.py)
# 原先漏声明:别人的环境跑知识入库会直接 ModuleNotFoundError: No module named 'docx'
python-docx>=1.1,<2
# Development and test dependencies
pytest>=8.3,<9
pytest-asyncio>=0.25,<1
ruff>=0.9,<1
mypy>=1.14,<2