-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpyproject.toml
More file actions
161 lines (142 loc) · 4.44 KB
/
pyproject.toml
File metadata and controls
161 lines (142 loc) · 4.44 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
[project]
name = "nonebot-plugin-wordcloud"
version = "0.10.0"
description = "适用于 NoneBot2 的词云插件"
authors = [{ name = "uy_sun", email = "hmy0119@gmail.com" }]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">= 3.10"
dependencies = [
"nonebot2>=2.4.2",
"nonebot-plugin-apscheduler>=0.4.0",
"nonebot-plugin-localstore>=0.7.1",
"nonebot-plugin-orm>=0.8.1",
"nonebot-plugin-alconna>=0.56.1",
"nonebot-plugin-uninfo>=0.8.0",
"nonebot-plugin-chatrecorder>=0.7.0",
"wordcloud>=1.9.2",
"jieba>=0.42.1",
"tzdata",
"emoji>=1.4.0",
]
[project.urls]
Homepage = "https://github.com/he0119/nonebot-plugin-wordcloud"
Repository = "https://github.com/he0119/nonebot-plugin-wordcloud.git"
Issues = "https://github.com/he0119/nonebot-plugin-wordcloud/issues"
Changelog = "https://github.com/he0119/nonebot-plugin-wordcloud/blob/main/CHANGELOG.md"
[project.optional-dependencies]
datastore = ["nonebot-plugin-datastore>=1.2.0"]
[build-system]
requires = ["uv_build>=0.11.16,<0.12"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-name = "nonebot_plugin_wordcloud"
module-root = ""
[dependency-groups]
dev = [
"nb-cli>=1.7.4",
"nonebug>=0.4.4",
"nonebot-adapter-onebot>=2.4.6",
"nonebot-plugin-orm[default]>=0.8.1",
"nonebot-plugin-datastore>=1.2.0",
"asyncpg>=0.31.0",
"aiomysql>=0.3.2",
"pytest-cov>=7.1.0",
"pytest-xdist>=3.8.0",
"pytest-mock>=3.15.1",
"pytest-asyncio>=1.3.0",
"respx>=0.23.1",
"httpx>=0.28.1",
"gevent>=26.5.0",
"cryptography>=48.0.0",
"bump-my-version>=1.3.0",
"poethepoet>=0.46.0",
"nonebot2[fastapi]>=2.4.2",
]
[tool.uv.pip]
universal = true
[tool.poe.tasks]
test = "pytest --cov=nonebot_plugin_wordcloud --cov-report xml --junitxml=./junit.xml -n auto"
"test:single" = "pytest --cov=nonebot_plugin_wordcloud --cov-report xml --junitxml=./junit.xml"
# async sqlalchemy 需要使用 gevent 才能获得正确覆盖率
# https://github.com/nedbat/coveragepy/issues/1082
"test:gevent" = "coverage run --concurrency=thread,gevent -m pytest --cov=nonebot_plugin_wordcloud --cov-report xml --junitxml=./junit.xml -n auto"
# Python 3.12 下需要启用 sysmon 模式,否则测试速度非常慢
# https://github.com/nedbat/coveragepy/issues/1665
"test:sysmon".ref = "test"
"test:sysmon".env = { "COVERAGE_CORE" = "sysmon" }
bump = "bump-my-version bump"
show-bump = "bump-my-version show-bump"
[tool.pyright]
pythonVersion = "3.10"
pythonPlatform = "All"
typeCheckingMode = "standard"
defineConstant = { PYDANTIC_V2 = true }
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.lint]
select = [
"W", # pycodestyle warnings
"E", # pycodestyle errors
"F", # pyflakes
"UP", # pyupgrade
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"TC", # flake8-type-checking
"RUF", # Ruff-specific rules
"I", # isort
]
ignore = [
"E402", # module-import-not-at-top-of-file
"RUF001", # ambiguous-unicode-character-string
"RUF002", # ambiguous-unicode-character-docstring
"RUF003", # ambiguous-unicode-character-comment
]
[tool.nonebot]
plugin_dirs = []
builtin_plugins = []
[tool.nonebot.plugins]
"@local" = []
nonebot-plugin-wordcloud = ["nonebot_plugin_wordcloud"]
[tool.nonebot.adapters]
"@local" = []
nonebot-adapter-onebot = [
{ name = "OneBot V12", module_name = "nonebot.adapters.onebot.v12" },
{ name = "OneBot V11", module_name = "nonebot.adapters.onebot.v11" },
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@overload",
"except ImportError:",
]
omit = ["*/compat.py", "*/migrations/*"]
[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
[tool.bumpversion]
current_version = "0.10.0"
commit = true
message = "chore(release): {new_version}"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = "## [Unreleased]"
replace = "## [Unreleased]\n\n## [{new_version}] - {now:%Y-%m-%d}"
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
regex = true
search = "\\[Unreleased\\]: (https://.+?)v{current_version}\\.\\.\\.HEAD"
replace = "[Unreleased]: \\1v{new_version}...HEAD\n[{new_version}]: \\1v{current_version}...v{new_version}"