File size: 3,343 Bytes
b4f2238
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
[project]
name = "fachuan-backend"
version = "26.27.4"
description = "法穿AI案件管理系统 - Backend"
requires-python = ">=3.12"
dependencies = [
    # --- Django 核心 ---
    "django==6.0.4",
    "django-cors-headers==4.9.0",
    "django-nested-admin==4.1.6",
    "django-ninja==1.6.2",
    "django-ninja-jwt==5.4.4",
    "django-ninja-extra==0.31.4",
    "django-q2==1.9.0",
    # --- ASGI / WebSocket ---
    "uvicorn[standard]==0.42.0",
    "channels==4.3.2",
    "channels-redis==4.3.0",
    "redis==7.4.0",
    # --- 数据库 ---
    "psycopg[binary]==3.3.3",
    # --- HTTP 客户端 ---
    "httpx[http2]==0.28.1",
    # --- LLM / AI ---
    "openai>=2.30.0",
    # --- 文档处理 ---
    "docxtpl==0.20.2",
    "python-docx==1.2.0",
    "reportlab==4.4.10",
    "pdfplumber==0.11.9",
    "pikepdf==10.5.1",
    "pymupdf==1.27.2.2",
    "openpyxl==3.1.5",
    # --- 图像处理 ---
    "opencv-python==4.13.0.92",
    "Pillow==12.2.0",
    # --- OCR ---
    "rapidocr==3.7.0",
    "ddddocr==1.6.1",
    # --- 浏览器自动化 ---
    "playwright==1.58.0",
    "playwright-stealth==2.0.2",
    # --- 数据处理 ---
    "pandas==3.0.2",
    "pydantic==2.12.5",
    "python-dateutil==2.9.0.post0",
    "pyyaml==6.0.3",
    # --- 安全 / 加密 ---
    "cryptography==46.0.7",
    # --- 可观测性 ---
    "psutil==7.2.2",
    "sentry-sdk>=2.57.0",
    # --- 配置 ---
    "python-dotenv==1.2.2",
    # --- 热重载 ---
    "watchdog==6.0.0",
    "watchfiles==1.1.1",
    # --- 生产部署 ---
    "gunicorn==25.3.0",
    "mammoth>=1.12.0",
    "markdown>=3.10.2",
    "weasyprint>=68.1",
    # --- MCP Server ---
    "mcp[cli]>=1.27.0",
    "gmssl==3.2.2",
    "daphne>=4.2.1",
    "python-multipart==0.0.26",
]

[dependency-groups]
dev = [
    # --- 代码格式化 ---
    "black==26.3.1",
    "isort==8.0.1",
    "ruff==0.15.8",
    # --- 类型检查 ---
    "mypy==1.20.0",
    "django-stubs==6.0.2",
    "django-stubs-ext==6.0.2",
    # --- 安全扫描 ---
    "bandit==1.9.4",
    "detect-secrets==1.5.0",
    "pip-audit==2.10.0",
    # --- Pre-commit ---
    "pre-commit==4.5.1",
]
test = [
    # --- 测试框架 ---
    "pytest==9.0.3",
    "pytest-django==4.12.0",
    "pytest-cov==7.1.0",
    "pytest-asyncio==1.3.0",
    # --- Property-Based Testing ---
    "hypothesis==6.151.10",
    # --- 测试工厂 ---
    "factory-boy==3.3.3",
]

[tool.uv]
default-groups = ["dev", "test"]

[tool.black]
line-length = 120
target-version = ['py312']
include = '\.pyi?$'
exclude = '''
/(
    \.git
  | \.mypy_cache
  | \.pytest_cache
  | \.hypothesis
  | \.tox
  | \.venv
  | _build
  | buck-out
  | build
  | dist
  | migrations
)/
'''

[tool.isort]
profile = "black"
line_length = 120
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
skip_glob = ["*/migrations/*", ".venv/*", ".hypothesis/*"]

[tool.coverage.run]
source = ["apps"]
omit = [
    "*/migrations/*",
    "*/tests/*",
    "*/test_*.py",
    "*/__pycache__/*",
    "*/.venv/*",
    "tests/*",
]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "raise AssertionError",
    "raise NotImplementedError",
    "if __name__ == .__main__.:",
    "if TYPE_CHECKING:",
    "class .*\\bProtocol\\):",
    "@(abc\\.)?abstractmethod",
]