-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
157 lines (144 loc) · 3.78 KB
/
pyproject.toml
File metadata and controls
157 lines (144 loc) · 3.78 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
[project]
name = "ahatts"
version = "0.1.0"
description = "AhaTalk TTS Service"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
# Core dependencies
"fastapi==0.115.6",
"uvicorn==0.34.0",
"click>=8.0.0",
"pydantic==2.10.4",
"pydantic-settings==2.7.0",
"python-dotenv==1.0.1",
"sqlalchemy==2.0.27",
# ML/DL Base
"numpy>=1.26.0",
"scipy==1.14.1",
# Audio processing
"soundfile==0.13.0",
"regex==2024.11.6",
# Utilities
"aiofiles==23.2.1",
"tqdm==4.67.1",
"requests==2.32.3",
"munch==4.0.0",
"tiktoken==0.8.0",
"loguru==0.7.3",
"openai>=1.59.6",
"pydub>=0.25.1",
"matplotlib>=3.10.0",
"mutagen>=1.47.0",
"psutil>=6.1.1",
"espeakng-loader==0.2.4",
"kokoro==0.9.4",
"unidic==1.1.0",
"misaki[en,ja,ko,zh]==0.9.4",
"spacy==3.8.5",
"en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl",
"inflect>=7.5.0",
"phonemizer-fork>=3.3.2",
"av>=14.2.0",
"text2num>=2.5.1",
]
[project.optional-dependencies]
gpu = ["torch==2.8.0+cu129"]
cpu = ["torch==2.8.0"]
rocm = [
"torch==2.8.0+rocm6.4",
"pytorch-triton-rocm>=3.2.0",
]
test = [
"pytest==8.3.5",
"pytest-cov==6.0.0",
"httpx==0.26.0",
"pytest-asyncio==0.25.3",
"tomli>=2.0.1",
"jinja2>=3.1.6",
]
[tool.uv]
conflicts = [
[
{ extra = "cpu" },
{ extra = "gpu" },
{ extra = "rocm" },
],
]
override-dependencies = [
"triton>=3.5.1 ; platform_machine == 'aarch64'"
]
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cuda", extra = "gpu" },
{ index = "pytorch-rocm", extra = "rocm" },
]
pytorch-triton-rocm = [
{ index = "pytorch-rocm", extra = "rocm" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cuda"
url = "https://download.pytorch.org/whl/cu129"
explicit = true
[[tool.uv.index]]
name = "pytorch-rocm"
url = "https://download.pytorch.org/whl/rocm6.4"
explicit = true
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
package-dir = { "" = "api/src" }
packages.find = { where = ["api/src"], namespaces = true }
[tool.pytest.ini_options]
testpaths = ["api/tests", "ui/tests"]
python_files = ["test_*.py"]
addopts = "--cov=api --cov=ui --cov-report=term-missing --cov-config=.coveragerc --full-trace"
asyncio_mode = "auto"
# ============================================================================
# Ruff - Python Linter & Formatter
# ============================================================================
[tool.ruff]
target-version = "py310"
line-length = 88
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
"examples",
"*.egg-info",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort (import sorting)
"UP", # pyupgrade (upgrade syntax for newer Python)
"B", # flake8-bugbear (common bugs)
"C4", # flake8-comprehensions (better list/dict comprehensions)
"SIM", # flake8-simplify (simplify code)
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"B905", # zip without strict (Python 3.10+)
]
[tool.ruff.lint.isort]
combine-as-imports = true
force-wrap-aliases = true
split-on-trailing-comma = true
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
known-first-party = ["api", "ui"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"