-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpyproject.toml
136 lines (124 loc) · 4.68 KB
/
pyproject.toml
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
[tool.taskipy.tasks]
serve = "python run.py"
format = "pysen run format"
lint = "pysen run lint"
typos = "typos"
test = "pytest"
update-snapshots = "pytest --snapshot-update"
update-licenses = "bash tools/create_venv_and_generate_licenses.bash"
build-dictionary = "python tools/build_dictionary.py"
filter-dictionary = "python tools/remove_dictionary_duplicates.py && python tools/remove_dictionary_duplicates_by_priority.py && python tools/remove_redundant_dictionary_entries.py"
build = "task update-licenses && pyinstaller --noconfirm run.spec"
[tool.pysen]
version = "0.11.0"
[tool.pysen.lint]
enable_black = true
enable_flake8 = true
enable_isort = true
# enable_mypy = true
enable_mypy = false # pysen から使うと意図的に unreachable にしているコードがエラーになるため (pysen は設定をカスタムできない)
mypy_preset = "strict"
mypy_plugins = [
{ function = "numpy.typing.mypy_plugin" },
{ function = "pydantic.mypy" },
]
line_length = 88
py_version = "py311"
isort_known_first_party = ["voicevox_engine"]
isort_known_third_party = ["numpy"]
[[tool.pysen.lint.mypy_targets]]
paths = ["."]
[tool.black] # automatically generated by pysen
# pysen ignores and overwrites any modifications
line-length = 88
target-version = ["py311"]
[tool.isort] # automatically generated by pysen
# pysen ignores and overwrites any modifications
default_section = "THIRDPARTY"
ensure_newline_before_comments = true
force_grid_wrap = 0
force_single_line = false
include_trailing_comma = true
known_first_party = ["voicevox_engine"]
known_third_party = ["numpy"]
line_length = 88
multi_line_output = 3
use_parentheses = true
[tool.pytest.ini_options]
filterwarnings = ["ignore::pydantic.warnings.PydanticDeprecatedSince20"]
[tool.typos.default.extend-words]
datas = "datas" # PyInstaller's argument
[tool.typos.files]
extend-exclude = [
"resources",
"test/e2e/single_api/engine_info/__snapshots__/test_engine_manifest/test_get_engine_manifest_200.json",
"poetry.*",
"README.md",
]
[tool.poetry]
package-mode = false
[tool.poetry.dependencies]
python = "~3.11"
numpy = "^1.26.0"
fastapi-slim = "^0.115.5"
jinja2 = "^3.1.3" # NOTE: required by fastapi.templating.Jinja2Templates (fastapi-slim's unmanaged dependency)
python-multipart = "^0.0.18" # NOTE: required by fastapi.Form (fastapi-slim's unmanaged dependency)
uvicorn = "^0.32.1"
soundfile = "^0.12.1"
pyyaml = "^6.0.1"
pyworld-prebuilt = "^0.3.4.4"
pyopenjtalk-plus = "^0.3.4.post10"
semver = "^3.0.0"
platformdirs = "^4.2.0"
soxr = "^0.5.0"
pydantic = "^2.7.3"
starlette = "^0.41.3"
jaconv = "^0.3.4"
httpx = "^0.27.0"
gputil = "^1.4.0"
psutil = "^6.1.1"
py-cpuinfo = "^9.0.0"
wmi = {version = "^1.5.1", platform = "win32"}
sentry-sdk = {version = "^2.19.2", extras = ["fastapi"]}
# truststore は HTTPS 通信時にシステムにインストールされた証明書ストアを使うために必要
## ref: https://github.com/psf/requests/issues/2966
## ref: https://truststore.readthedocs.io/en/latest/
truststore = "^0.10.0"
# sudachipy 0.6.9 は Linux arm64 でのビルドに失敗するため、当面 0.6.8 に固定する
sudachipy = "0.6.8"
# aivmlib は AIVMX ファイルのメタデータ読み取りに必要
aivmlib = "^1.0.0"
# AivisSpeech-Engine にはカスタマイズされた Style-Bert-VITS2 が必要
style-bert-vits2 = { git = "https://github.com/tsukumijima/Style-Bert-VITS2", rev = "f15eff6ac01602fb7e55588b7f37c66da6d58a75" }
# OS に応じて適切な ONNX Runtime プラグインをインストール
## Windows では若干速度は落ちるが onnxruntime-directml で代用できるのとファイルサイズがデカいので、
## 当面 onnxruntime-gpu はインストールしない
onnxruntime = "^1.20.0"
onnxruntime-directml = { version = "^1.20.0", markers = "sys_platform == 'win32' and (platform_machine == 'x86_64' or platform_machine == 'AMD64')" }
onnxruntime-gpu = { version = "^1.20.0", markers = "sys_platform == 'linux' and platform_machine == 'x86_64'" }
[tool.poetry.group.dev.dependencies]
pysen = "^0.11.0"
black = "^24.4.0"
flake8-bugbear = "^24.4.26"
flake8 = "^7.0.0"
isort = "^5.13.0"
mypy = "^1.10.0"
pytest = "^8.2.0"
coveralls = "^4.0.1"
poetry = "1.8.5"
poetry-plugin-export = "^1.8.0"
httpx = "^0.27.0" # NOTE: required by fastapi.testclient.TestClient (fastapi-slim's unmanaged dependency)
syrupy = "^4.6.1"
types-pyyaml = "^6.0.12"
safety = "^3.1.0"
pip-licenses = "5.0.0" # NOTE: must be specified exactly (c.f. #1281)
pre-commit = "^4.0.1"
[tool.poetry.group.build.dependencies]
pyinstaller = "^5.13"
poetry = "1.8.5"
poetry-plugin-export = "^1.8.0"
pip-licenses = "5.0.0" # NOTE: must be specified exactly (c.f. #1281)
taskipy = "^1.12.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"