-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
186 lines (167 loc) · 5.28 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
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
[project]
name = "icespeak"
version = "0.3.8"
description = "Icespeak - Icelandic TTS library"
authors = [{ name = "Miðeind ehf.", email = "[email protected]" }]
readme = { file = "README.md", content-type = "text/markdown" }
license = { file = "LICENSE.txt" }
# For classifier list see: https://pypi.org/pypi?%3Aaction=list_classifiers
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: Unix",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Natural Language :: Icelandic",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Text Processing :: Linguistic",
"Topic :: Multimedia :: Sound/Audio :: Speech",
"Typing :: Typed",
]
requires-python = ">=3.9"
dependencies = [
# "aiohttp[speedups]>=3.8.4",
"requests>=2.32.3",
"typing-extensions>=4.12.2",
"pydantic==2.3.0",
"pydantic-settings>=2.0.3",
"cachetools>=5.5.0",
# For parsing Icelandic text
"islenska<2.0.0",
"reynir<4.0.0",
"tokenizer<4.0.0",
# Azure TTS
"azure-cognitiveservices-speech>=1.41.1",
# AWS Polly TTS
"botocore>=1.21.40",
"boto3>=1.18.40",
# OpenAI TTS
"openai>=1.44",
# Piper TTS
"piper-TTS>=1.2.0",
]
[project.urls]
Repository = "https://github.com/mideind/icespeak"
[project.scripts]
speak = "icespeak.cli:main"
[project.optional-dependencies]
# Needed for CLI interface
cli = ["typer[all]==0.9.0"]
# Dev dependencies
dev = [
"pytest>=7.2.1",
"coverage[toml]>=7.3.1",
"black>=23.7.0",
"ruff>=0.5.7",
"pre-commit>=3.3.3",
"mypy>=1.4.1",
"boto3-stubs>=1.35.48",
]
# *** Configuration of tools ***
[tool.pytest.ini_options]
filterwarnings = [
# Ignore deprecation warnings in libraries, their problem not ours
"ignore::DeprecationWarning",
# Make sure "error:::icespeak" is always last,
# as it turns warnings into errors in our code
"error:::icespeak",
]
markers = [
# Custom markers (add to SKIP_MARKERS in `tests/conftest.py` to skip by default)
"network: mark test as communicating with external services",
"slow: mark test as slow",
]
addopts = "--strict-markers" # Don't allow unrecognized markers (catches typos)
[tool.coverage.run]
branch = true
source = ["icespeak"]
command_line = "-m pytest --run-all"
omit = ["*/icespeak/cli.py"] # Skip CLI interface
[tool.coverage.report]
exclude_also = ["if TYPE_CHECKING:", "raise NotImplementedError"]
skip_covered = true # Skip showing fully covered files
skip_empty = true # Skip empty files
sort = "-Cover" # Sort by coverage percentage
precision = 2 # Precision of output percentage
fail_under = 65 # Fail if total covered under threshold
[tool.mypy]
overrides = [
{ module = "google.*", ignore_missing_imports = true },
{ module = "azure.*", ignore_missing_imports = true },
]
[tool.pyright]
typeCheckingMode = "strict"
# Some of the following settings are off by default, even in strict mode
reportCallInDefaultInitializer = "information"
reportImplicitOverride = "information"
reportImplicitStringConcatenation = "information"
reportImportCycles = "warning"
reportMissingSuperCall = "none"
reportPropertyTypeMismatch = "warning"
reportUnknownMemberType = "information"
reportUnknownArgumentType = "information"
reportMissingTypeStubs = "information"
reportShadowedImports = "warning"
reportUninitializedInstanceVariable = "information"
reportUnnecessaryTypeIgnoreComment = "warning"
reportUnusedCallResult = "none"
[tool.ruff]
target-version = "py39"
line-length = 120
[tool.ruff.lint]
# See https://beta.ruff.rs/docs/rules/ for list of rules
# Enable all rules
select = ["ALL"]
# Ignore specific rules
# (we should aim to have these as few as possible)
ignore = [
"D", # Docstring style rules
"TD", # Pedantic TODO comment rules
"FIX002", # Line contains TODO rule
"FIX004", # Line contains HACK rule
"S101", # Disallow assert statements rule
"TRY", # Pedantic exception rules
"EM", # Pedantic exception message rules
"PLR",
"ARG",
"C",
"E",
"BLE",
"ANN",
"PTH",
"SLF",
"RUF",
"PGH",
"SIM",
"FA",
"N",
"A",
"ISC",
"PLW",
"RET",
# Keep these ignored (either disagreeable or cause issues)
"COM", # Commas (sometimes takes issue with black formatting)
"ERA", # Commented out code
]
[tool.ruff.lint.isort]
known-first-party = ["icespeak"]
section-order = [
"future",
"typehints",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
# Have typing libraries above other imports
typehints = ["typing", "typing_extensions", "types", "collections.abc"]
# *** Build system configuration ***
[tool.setuptools_scm]
fallback_version = "0.0.0"
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"