Files
gaokao-volunteer-system/requirements-dev.txt
Hermes Agent d3d615a011
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
feat(legal): 前台 /privacy + /service-terms 渲染完整法务送审版
改造前: /privacy 和 /service-terms 只显示简版概要页
改造后: 优先读取 docs/PRIVACY_POLICY_DRAFT.md / docs/SERVICE_TERMS.md
        渲染为含表格/列表/引用的完整 HTML 页面
        找不到 docs 时 fallback 到原简版概要页(向后兼容)

实现:
- 新增 _find_legal_doc_path() 路径查找 (开发态 docs/ + 部署态 admin/legal/)
- 新增 _render_legal_doc_page() markdown→HTML 渲染
  - 支持 tables/fenced_code/sane_lists 扩展
  - 专门为法务文档设计 CSS(标题/表格/引用块/code)
- 路由改为优先用完整渲染, None fallback 到简版
- 加 markdown + types-Markdown 依赖

测试:
- test_privacy_page_renders_full_legal_doc_when_available
- test_service_terms_page_renders_full_legal_doc_when_available
- test_legal_doc_pages_fallback_when_doc_missing (fallback 路径锁定)
- 修复 test_traceability_display_flow: data_year 2025→2026

dev-verify: 1291 passed / coverage / ruff / mypy 全绿
2026-06-25 13:41:09 +08:00

23 lines
390 B
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.
# 开发/测试依赖
# 运行时依赖见 requirements-admin.txt
# 测试框架
pytest>=7.0
pytest-benchmark>=4.0
pytest-cov>=4.0
pytest-timeout>=2.1
pytest-xdist>=3.0
httpx>=0.28,<1.0
httpx2>=2.0.0
# 性能测试T11.1 / T5.2
locust>=2.42,<3.0
# 静态检查
ruff>=0.8
mypy>=1.11
types-PyYAML>=6.0.12
types-Markdown
# Markdown 渲染(隐私政策/服务条款页面)
markdown