-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
149 lines (129 loc) · 2.82 KB
/
pyproject.toml
File metadata and controls
149 lines (129 loc) · 2.82 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
[project]
name = "amaidesu"
version = "0.1.0"
description = "MaiBot VTuber - AI VTuber Assistant with MaiCore Integration"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.12"
# 核心依赖
dependencies = [
# Web 框架和网络
"aiohttp>=3.9.0",
"fastapi>=0.100.0",
"uvicorn>=0.20.0",
"requests>=2.31.0",
"websockets>=10.0",
# 日志和配置
"loguru>=0.7.0",
"toml>=0.10.0",
"python-logging-loki>=0.3.0",
# 数据验证
"pydantic>=2.0",
# CLI
"typer>=0.9.0",
# MaiCore 消息协议
"maim-message>=0.1.0",
# VTube Studio 控制
"pyvts>=0.3.0",
# TTS 相关
"edge-tts>=6.1.0",
"sounddevice>=0.4.0",
"soundfile>=0.12.0",
"pygame>=2.5.0",
# 音频处理
"librosa>=0.10.0",
"scipy>=1.10.0",
# 图像和屏幕捕获
"mss>=9.0.0",
"numpy>=1.24.0",
"Pillow>=10.0.0",
# LLM API
"dashscope>=1.14.0",
"openai>=1.0.0",
# OBS 控制
"obsws-python>=1.6.0",
# GUI
"customtkinter>=5.2.0",
# 自动化和 OSC
"pyautogui>=0.9.0",
"python-osc>=1.8.0",
"pytest>=9.0.2",
"tomli-w>=1.2.0",
"tomlkit>=0.14.0",
"python-frontmatter>=1.1.0",
]
[project.optional-dependencies]
# 语音识别(需要 PyTorch)
stt = [
"torch>=2.0.0",
"torchaudio>=2.0.0",
]
# 开发依赖
dev = [
"ruff>=0.1.0",
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"setuptools>=68.0.0",
]
# 所有可选依赖
all = [
"amaidesu[stt]",
"amaidesu[dev]",
]
[project.scripts]
amaidesu = "main:main"
[tool.uv]
# 开发模式下默认安装开发依赖
dev-dependencies = [
"ruff>=0.1.0",
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=5.0.0",
"setuptools>=68.0.0",
]
[tool.ruff]
include = ["*.py"]
exclude = ["plugins_backup/*","tests/*"]
# 行长度设置
line-length = 120
[tool.ruff.lint]
fixable = ["ALL"]
unfixable = []
# 如果一个变量的名称以下划线开头,即使它未被使用,也不应该被视为错误或警告。
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# 启用的规则
select = [
"E", # pycodestyle 错误
"F", # pyflakes
"B", # flake8-bugbear
]
ignore = ["E711", "E501"]
[tool.ruff.format]
docstring-code-format = true
indent-style = "space"
# 使用双引号表示字符串
quote-style = "double"
# 尊重魔法尾随逗号
# 例如:
# items = [
# "apple",
# "banana",
# "cherry",
# ]
skip-magic-trailing-comma = false
# 自动检测合适的换行符
line-ending = "auto"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"pre-commit>=4.5.1",
]
[tool.hatch.build.targets.wheel]
packages = ["src"]