-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
108 lines (95 loc) · 2.23 KB
/
pyproject.toml
File metadata and controls
108 lines (95 loc) · 2.23 KB
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
[project]
name = "pythoncodehub"
version = "0.1.0"
description = "用于记录日常开发中遇到的可以复用的代码"
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"celery==5",
"django-celery-beat>=2.1",
"djangorestframework>=3.16.1",
"inflection>=0.5.1",
"pandas>=2.3.1",
"redis==6",
"requests>=2.32.4",
]
[dependency-groups]
dev = [
"fakeredis>=2.33",
"pre-commit>=4.2",
"pytest>=8.4.1",
"pytest-cov>=7",
"pytest-mock>=3.15.1",
"pytest-xdist>=3.8",
"requests-mock>=1.12.1",
"responses>=0.25.8",
"ruff>=0.12",
]
[tool.ruff]
line-length = 120
exclude = [
".git",
".pytype",
".ruff_cache",
".venv",
"__pypackages__",
"node_modules",
"scripts",
"venv",
]
lint.select = [ "E4", "E7", "E9", "F", "UP" ]
lint.extend-ignore = [ "E402", "E741" ]
lint.fixable = [ "ALL" ]
lint.extend-safe-fixes = [ "UP" ]
[tool.codespell]
ignore-words-list = "3rt,abd,aer,ans,bitap,crate,damon,fo,followings,hist,iff,kwanza,manuel,mater,secant,som,sur,tim,toi,zar"
skip = "./.*,*.json,*.lock,ciphers/prehistoric_men.txt,project_euler/problem_022/p022_names.txt,pyproject.toml,strings/dictionary.txt,strings/words.txt"
# pytest 配置
[tool.pytest.ini_options]
# 测试发现路径
testpaths = [ "tests/" ]
# Python 文件模式
python_files = [ "test_*.py" ]
python_classes = [ "Test*" ]
python_functions = [ "test_*" ]
# 标记定义
markers = [
"unit: 单元测试",
"slow: 慢速测试(>1s)",
"redis: 需要 Redis Mock",
"celery: 需要 Celery Mock",
"network: 需要网络 Mock",
]
# 输出配置
addopts = [
"-v",
"--tb=short",
"--cov=http_client",
"--cov-report=term-missing",
"--cov-fail-under=90",
"-p",
"no:warnings",
]
# 覆盖率配置
[tool.coverage.run]
source = [ "http_client" ]
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/site-packages/*",
]
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
[[tool.uv.index]]
# 配置清华源
#url = "https://pypi.tuna.tsinghua.edu.cn/simple"
url = "https://mirrors.aliyun.com/pypi/simple"
default = true