forked from caikit/caikit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
214 lines (184 loc) · 5.77 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
[build-system]
requires = ["setuptools>=60", "setuptools-scm>=8.0"]
[project]
name = "caikit"
dynamic = ["version"]
description = "AI toolkit that enables AI users to consume stable task-specific model APIs and enables AI developers build algorithms and models in a modular/composable framework"
license = {text = "Apache-2.0"}
readme = "README.md"
requires-python = ">=3.8"
classifiers=[
"License :: OSI Approved :: Apache Software License"
]
dependencies = [
"alchemy-config>=1.1.1,<2.0.0",
"alchemy-logging>=1.3.2,<2.0.0",
"anytree>=2.7.0,<3.0",
"docstring-parser>=0.14.1,<0.17.0",
"grpcio>=1.35.0,<2.0,!=1.55.0,!=1.64.0",
"ijson>=3.1.4,<3.3.0",
"importlib-metadata>=6.8.0,<8.0.0",
"munch>=2.5.0,<5.0",
"numpy>=1.22.2,<2",
"protobuf>=3.19.0,<6",
"psutil>=5,<6",
"py-to-proto>=0.5.0,<0.6.0,!=0.2.1",
"PyYAML>=6.0,<7.0",
"semver>=2.13.0,<4.0",
"six>=1.16.0,<2.0.0",
"tqdm>=4.59.0,<5.0.0",
"werkzeug>=2.3.7,<4.0.0"
]
[project.scripts]
caikit-runtime = "caikit.runtime.__main__:main"
caikit-health-probe = "caikit_health_probe.__main__:main"
caikit-render-interfaces = "caikit.runtime.dump_services:main"
[project.optional-dependencies]
## Runtime Extra Sets ##
runtime-grpc = [
"grpcio-health-checking>=1.35.0,<2.0",
"grpcio-reflection>=1.35.0,<2.0",
"prometheus_client>=0.12.0,<1.0",
"py-grpc-prometheus>=0.7.0,<0.9",
]
runtime-http = [
"fastapi[all]>=0.100,<1",
"pydantic>=2.8.0,<3",
"requests>=2.28.2,<3",
"sse-starlette>=1.6.1,<3",
"typing_extensions>=4.12.0,<5",
]
# This is only required for HTTP clients
runtime-client = [
"requests>=2.28.2,<3",
]
# Needed to enable Open Telemetry tracing
runtime-trace = [
"opentelemetry-sdk>=1.24.0,<2",
"opentelemetry-exporter-otlp>=1.24.0,<2",
]
interfaces-vision = [
"pillow>=6.2.1,<11.0"
]
interfaces-ts = [
"pandas>=1.4.3,<2",
]
interfaces-ts-pyspark = [
"caikit[interfaces-ts]",
"pyspark>=3.3,<3.6",
"pyarrow>=8.0.0,<16"
]
# NOTE: This is "all" from the user perspective, not the dev perspective
all = [
"caikit[runtime-grpc, runtime-http, runtime-client, runtime-trace, interfaces-vision, interfaces-ts]",
]
## Dev Extra Sets ##
dev-test = [
# NOTE: pytest-asyncio>=0.22 breaks importing with an error about multiple
# imports of sample modules
"pytest-asyncio>=0.21.0,<0.22",
"pytest-cov>=2.10.1,<6.0",
"pytest-html>=3.1.1,<5.0",
"pytest>=6.2.5,<8.0",
"tls_test_tools>=0.1.1",
"wheel>=0.38.4",
"caikit[interfaces-vision, interfaces-ts-pyspark, runtime-client]",
]
dev-docs = [
"sphinx>=4.0.2,<8.0",
"sphinx-autoapi>=2.1.0",
"sphinx-rtd-theme>=1.2.1,<2.1.0",
]
dev-fmt = [
"ruff==0.4.7",
"pre-commit>=3.0.4,<4.0",
"pydeps>=1.12.12,<2",
]
dev-build = [
"flit==3.9.0",
]
# NOTE: This is a "special" dependency set to allow for compatibility tests with
# older versions of protobuf, therefore, the upper bound on protobuf _must_ remain
# unchanged.
dev-proto3 = [
"caikit[all-dev]",
"protobuf>=3.19.0,<3.20",
"grpcio>=1.35.0,<1.64",
"grpcio-health-checking>=1.35.0,<1.64",
"grpcio-reflection>=1.35.0,<1.64",
]
# NOTE: This is "all" from the user and dev perspective
all-dev = [
"caikit[all, dev-test, dev-docs, dev-fmt, dev-build]"
]
[tool.setuptools.packages.find]
where = [""]
include = ["caikit", "caikit*"]
[tool.setuptools_scm]
write_to = "caikit/_version.py"
[project.urls]
Source = "https://github.com/caikit/caikit"
[tool.pytest.ini_options]
markers = [
"examples: marks tests as e2e examples (deselect with '-m \"not examples\"')",
"slow: marks tests requiring pyspark be installed (deselect with '-m \"not slow\"')"
]
filterwarnings = [
"ignore:distutils Version classes are deprecated.*:DeprecationWarning",
"ignore:np.find_common_type is deprecated.*:DeprecationWarning",
"ignore:Converting `np.character` to a dtype is deprecated.*:DeprecationWarning",
]
[tool.ruff]
line-length = 100
target-version = "py38"
exclude = ["caikit/runtime/protobufs/*.py"]
[tool.ruff.lint]
select = [ "E", "F", "UP", "B", "SIM", "I"]
ignore = [
"UP032", # f-string
"UP034", # extraneous-parentheses
# "UP035", # deprecated-import
## original errors fromt pylint
"F403", # unable to detect undefined names
"I001", # import block unsorted/unformatted
"E402", # module level import not at top of file
# "B028", # warnings: no explicit stacklevel keyword argument found
# "I0001", # raw-checker-failed
# "I0010", # bad-inline-option
# "I0011", # locally-disabled
# "I0013", # file-ignored
# "I0020", # suppressed-message
# "I0021", # useless-suppression
# "I0022", # deprecated-pragma
## added messages in caikit
# "I0023", # use-symbolic-message-instead
# "C0103", # invalid-name
# "C0115", # missing-class-docstring
# "C0114", # missing-module-docstring
# "C0116", # missing-function-docstring
# "C0209", # consider-using-f-string
# "R1710", # inconsistent-return-statements
# "E1101", # no-member
# "R0913", # too-many-arguments
# "R0914", # too-many-locals
# "R0912", # too-many-branches
# "R0915", # too-many-statements
# "R0401", # cyclic-import
# "R0903", # too-few-public-methods
# "W0212", # protected-access
# "W0511", # fixme
# "W1202", # logging-format-interpolation
# "E1205", # logging-too-many-args
# "W0201", # attribute-defined-outside-init
# "W0223", # abstract-method
# "W0104", # pointless-statement
# "C0411", # wrong-import-order
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"F401", # imported but unused
"F403" # unable to detect undefined names
]
"caikit/runtime/service_generation/protoable.py" = [
"SIM114", # Combine `if` branches using logical `or` operator # TODO: simplify this logic
]