Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
237 lines (200 loc) · 4.69 KB
/
Copy pathpyproject.toml
File metadata and controls
237 lines (200 loc) · 4.69 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
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
[project]
name = "mx-rmq"
version = "1.6.2"
description = "基于Redis的异步消息队列系统"
readme = "README.md"
requires-python = ">=3.10"
authors = [
{name = "Alistar Max", email = "codingox@gmail.com"}
]
license = {text = "MIT"}
keywords = ["redis", "message-queue", "async", "distributed"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Distributed Computing",
]
dependencies = [
"redis[hiredis]>=6.3.0",
"pydantic>=2.11.7",
"loguru>=0.7.3",
]
[project.optional-dependencies]
dev = [
"pytest>=8.4.1",
"pytest-asyncio>=1.1.0",
"pytest-cov>=6.2.1",
"black>=25.1.0",
"ruff>=0.12.7",
"mypy>=1.17.1",
]
[project.urls]
Homepage = "https://github.com/CodingOX/mx-rmq"
Repository = "https://github.com/CodingOX/mx-rmq"
Documentation = "https://github.com/CodingOX/mx-rmq#readme"
Issues = "https://github.com/CodingOX/mx-rmq/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/mx_rmq"]
[tool.hatch.build.targets.sdist]
exclude = [
# 开发工具和临时文件
"**/.cursor/**",
"**/issues/**",
"**/scripts/**",
"**/.pytest_cache/**",
"**/__pycache__/**",
"**/*.pyc",
"**/*.pyo",
# 版本控制文件
".git/**",
".gitignore",
".gitattributes",
# IDE 和编辑器文件
".vscode/**",
".idea/**",
"*.swp",
"*.swo",
"*~",
# 构建产物
"build/**",
"dist/**",
"*.egg-info/**",
# 文档和示例(可选)
"docs/**",
"examples/**",
# 如果不想包含测试,取消注释下一行
# "tests/**",
# 其他临时文件
".coverage",
".tox/**",
".mypy_cache/**",
".ruff_cache/**",
"CLAUDE.md",
# 虚拟环境和包管理工具缓存
".venv/**",
"venv/**",
"env/**",
"ENV/**",
"env.bak/**",
"venv.bak/**",
".rye/**",
".pdm-cache/**",
".hatch/**",
# 锁文件和包管理
"uv.lock",
"Pipfile.lock",
".installed.cfg",
"MANIFEST",
# 测试覆盖率报告
"coverage.xml",
"htmlcov/**",
"*.cover",
"*.py,cover",
".hypothesis/**",
".cache/**",
".nox/**",
"nosetests.xml",
# 构建和开发脚本
"Makefile",
"*.sh",
# AI 和开发配置
".ai-rules/**",
".luarc.json",
".history/**",
# GitHub 和 CI/CD
".github/**",
# 系统文件
".DS_Store",
"Thumbs.db",
# 其他开发文件
".python-version",
"*.log",
".env",
".env.*",
# Jupyter 相关
".ipynb_checkpoints/**",
"profile_default/**",
"ipython_config.py",
# 临时文件和备份
"*.tmp",
"*.temp",
"*.bak",
"#*#",
".#*",
]
[tool.black]
line-length = 88
target-version = ['py312']
include = '\.pyi?$'
[tool.ruff]
target-version = "py312"
line-length = 88
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = []
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers --strict-config"
testpaths = ["tests"]
markers = [
"asyncio: 标记异步测试",
"slow: 标记运行时间较长的测试",
"integration: 标记集成测试",
"redis_v8: 标记需要Redis 8.x的测试",
"redis_v6: 标记需要Redis 6.x的测试"
]
[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
]
# 优化后的镜像配置
[tool.uv]
# index-url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
# index-url = "https://mirrors.tencent.com/pypi/simple"
[dependency-groups]
dev = [
"build>=1.3.0",
"pytest-asyncio>=1.1.0",
"pytest-cov>=6.2.1",
"pytest-mock>=3.14.1",
"pytest-timeout>=2.4.0",
"ruff>=0.12.7",
"twine>=6.1.0",
]