-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
166 lines (152 loc) · 3.61 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
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "azarrot"
description = "An OpenAI compatible server, focusing on OpenVINO and IPEX-LLM usage."
license = {file = "LICENSE"}
authors = [
{name = "notsyncing", email = "[email protected]"},
]
readme = "README.md"
requires-python = "<= 3.11.99"
version = "0.3.0"
dependencies = [
"openvino==2024.3",
"optimum[openvino]==1.20.0",
"ipex-llm[xpu]==2.1.0",
"fastapi==0.111.0",
"pyyaml==6.0.1",
"decord==0.6.0",
"jinja2==3.1.4",
"huggingface_hub==0.24.6"
]
classifiers = [
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 2 - Pre-Alpha",
# Indicate who your project is intended for
"Intended Audience :: End Users/Desktop",
"Topic :: Internet",
# Pick your license as you wish (see also "license" above)
"License :: OSI Approved :: Apache Software License",
# Specify the Python versions you support here.
"Programming Language :: Python :: 3.11",
]
[project.optional-dependencies]
dev = [
"tox",
"azarrot[lint]",
"azarrot[test]",
"azarrot[doc]",
"azarrot[build]",
]
lint = [
"mypy",
"ruff",
]
test = [
"pytest==7.4.1",
"pytest-cov==4.1.0",
"coverage[toml]==7.3.1",
"openai==1.43.0"
]
doc = [
"sphinx",
"myst-parser",
"furo",
]
build = [
"build[virtualenv]==1.0.3",
]
[project.scripts]
azarrot = "azarrot.server:main"
[tool.ruff]
line-length = 120
src = ["src"]
extend-exclude = [
"conf.py",
]
target-version = "py311"
lint.select = ["ALL"]
lint.ignore = [
"C901",
"D100",
"D101",
"D102",
"D103",
"D107",
"D200",
"D415",
"EM101",
"EM102",
"E722",
"COM812", # Conflicts with the formatter
"ISC001", # Conflicts with the formatter
"ANN101", # "missing-type-self"
"ANN401",
"PT001", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
"PT004", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
"PT005", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
"PT023", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
"PLR0912",
"PLR0913",
"DTZ005",
"DTZ006",
"TRY003",
"TRY004",
"FBT001",
"FBT002",
"RET505",
"SIM102",
"N812",
"S101",
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"S101", # Use of `assert` detected
"RUF001",
"PLR2004",
]
"**/__init__.py" = [
"D104",
"F401", # Imported but unused
"F403", # Wildcard imports
]
"docs/**" = [
"INP001", # Requires __init__.py but docs folder is not a package.
]
[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`(https://github.com/astral-sh/ruff/issues/5434)
keep-runtime-typing = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
disallow_untyped_defs = true # Functions need to be annotated
warn_unused_ignores = true
ignore_missing_imports = true
exclude = [
"azarrot-\\d+", # Ignore temporary folder created by setuptools when building an sdist
"venv/",
"venv.*/",
"build/",
"dist/",
"docs/",
"models/",
]
[tool.pytest.ini_options]
addopts = """
--import-mode=append
--cov=azarrot
--cov-config=pyproject.toml
--cov-report=
"""
log_cli = true
log_cli_level = "INFO"
[tool.coverage.paths]
# Maps coverage measured in site-packages to source files in src
source = ["src/", ".tox/*/lib/python*/site-packages/"]
[tool.coverage.html]
directory = "reports/coverage_html"