-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathpyproject.toml
More file actions
265 lines (246 loc) · 7.23 KB
/
Copy pathpyproject.toml
File metadata and controls
265 lines (246 loc) · 7.23 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
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
[project]
name = "flyte"
dynamic = ["version"]
description = "The open source durable AI runtime for model training and batch/online inference."
readme = "README.md"
authors = [{ name = "Flyte Contributors", email = "admin@flyte.org" }]
requires-python = ">=3.10"
dependencies = [
"aiofiles>=24.1.0",
"click>=8.2.1",
"cloudpickle>=3.1.1",
"docstring_parser>=0.16",
"fsspec>=2025.3.0",
# Cap below 0.11: connectrpc 0.11.0 made RequestContext.request_headers a property
# (was a method), breaking the auth interceptor with "'Headers' object is not callable".
"connectrpc>=0.9.0,<0.11",
"obstore>=0.7.3",
"protobuf>=6.30.1",
"pydantic>=2.10.6",
"pyyaml>=6.0.2",
"rich-click==1.8.9",
"httpx>=0.28.1,<1.0.0",
"keyring>=25.6.0",
"msgpack>=1.1.0",
"toml>=0.10.2",
"async-lru>=2.0.5",
"mashumaro>=3.15",
"aiolimiter>=1.2.1",
"flyteidl2==2.0.42",
"packaging",
"sentry-sdk>=2.0",
"pyOpenSSL>=24.0.0",
"asyncssh>=2.14",
]
[project.scripts]
flyte = "flyte.cli.main:main"
a0 = "flyte._bin.runtime:main"
clustered = "flyte._bin.clustered:main"
fserve = "flyte._bin.serve:main"
c0 = "flyte._bin.connect:main"
flyte-mcp = "flyte._bin.mcp:main"
[project.entry-points."keyring.backends"]
flyte_keyring_file = "flyte._keyring.file"
[build-system]
requires = ["setuptools", "setuptools_scm"]
build-backend = "setuptools.build_meta"
[project.optional-dependencies]
aiosqlite = [
"aiosqlite>=0.21.0",
]
connector = [
"grpcio>=1.71.0",
"grpcio-health-checking",
"httpx",
"prometheus-client",
]
examples-test = [
# Dependencies for running integration tests on examples
"polyglot-hello>=0.1.3",
"pandas",
"pyarrow",
"scikit-learn",
"joblib",
"nest-asyncio",
"deltalake",
"fastapi",
"uvicorn",
"lightning",
]
sandbox = [
"pydantic-monty==0.0.17",
]
mcp = [
# Capped below 2: mcp 2.0.0 removed `mcp.server.fastmcp`, which `FlyteMCPAppEnvironment`
# imports, so an uncapped install resolves to a version this code cannot use. Supporting
# 2.x is a migration rather than a rename — `mcp.server` was reorganised — so it needs its
# own change before the cap can move.
"mcp>=1.26.0,<2",
"starlette",
"uvicorn",
# Search patterns come from the caller. `re` cannot bound backtracking and a pathological
# pattern is a single C call that holds the GIL — freezing the whole server, not just that
# request. `regex` supports a per-match timeout; without it search falls back to literal
# substring matching.
"regex>=2024.5.15",
]
tui = [
"textual>=0.80",
]
rust-controller = [
"flyte_controller_base>=2.0.0b0",
]
[dependency-groups]
dev = [
"pydantic-monty==0.0.17",
"build>=1.2.2.post1",
"fastapi>=0.128.0",
"uvicorn>=0.40.0",
"mock>=5.2.0",
"pytest>=8.3.5",
"pytest-xdist",
"pytest-asyncio>=0.26.0",
"pytest-benchmark>=5.1.0",
"ruff>=0.11.0",
"setuptools-scm>=8.2.0",
"google-cloud-bigquery>=3.31.0",
"pandas",
"pyarrow",
"orjson",
"docstring_parser",
"jupyterlab>=4.4.3",
"ipywidgets>=8.1.7",
"mypy>=1.16.0",
"ty>=0.0.59",
"types-PyYAML",
"types-aiofiles",
"kubernetes",
"textual>=0.80",
"mcp>=1.26.0,<2", # mirrors the `mcp` extra; see the note there
"starlette",
"uvicorn",
# Mirrors the `mcp` extra: the MCP search tests assert regex behavior and its timeout.
"regex>=2024.5.15",
]
[tool.setuptools]
include-package-data = true
license-files = ["licenses/*.txt", "LICENSE"]
package-dir = {"" = "src"}
script-files = [
"src/flyte/_bin/runtime.py",
"src/flyte/_bin/debug.py",
]
[tool.setuptools.packages.find]
where = ["src"]
include = ["flyte*"]
[tool.setuptools_scm]
write_to = "src/flyte/_version.py"
# Only Python releases are tagged "v<semver>". Other tags live in this repo too
# (e.g. "rs-v0.1.0" for the Rust crates), and without these two settings a plain
# `git describe` picks the nearest tag of any kind, producing a bogus version
# like 0.1.1.dev4 that the backend rejects as older than the minimum SDK.
tag_regex = '^v(?P<version>\d+\.\d+\.\d+.*)$'
git_describe_command = [
"git",
"describe",
"--dirty",
"--tags",
"--long",
"--match",
"v[0-9]*",
]
[tool.pytest.ini_options]
markers = [
"integration: Integration tests against Flyte backend",
"editable",
"sandbox",
"apps: App deployment tests using flyte.deploy",
"gpu: Tests requiring GPU resources",
"external: Tests requiring external services (BigQuery, etc.)",
"stress: Stress/load tests (skip by default)",
"secrets: Tests requiring secrets configuration",
]
norecursedirs = []
log_cli = true
log_cli_level = 20
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
branch = true
[tool.ruff]
line-length = 120
extend-exclude = [
"src/flyte/remote/client/_protocols.py",
"examples/reports",
]
[tool.ruff.lint]
select = [
"E",
"W",
"F",
"I",
"PLW",
"YTT",
"ASYNC",
"C4",
"T10",
"EXE",
"ISC",
"LOG",
"PIE",
"Q",
"RSE",
"FLY",
"PGH",
"PLC",
"PLE",
"PLW",
"FURB",
"RUF",
]
ignore = ["PGH003", "PLC0415", "ASYNC210", "ASYNC240", "FURB122"]
[tool.ruff.lint.per-file-ignores]
"examples/*" = ["E402"]
"plugins/pandera/tests/test_pyspark_sql_transformer.py" = ["E402"]
"src/flyte/ai/chat/_html.py" = ["E501"]
[tool.mypy]
disable_error_code = ["import-untyped"]
ignore_missing_imports = true
# Examples are standalone scripts with recurring filenames (main.py, app.py, ...).
# Deriving module names from full paths (with src/ as the package root for flyte
# itself) lets mypy check them all in one invocation without duplicate-module errors.
explicit_package_bases = true
mypy_path = ["src"]
[tool.uv]
exclude-newer = "5 days"
# Opt flyteorg packages out of the global recency cutoff so freshly published
# flyteidl2/flyte_controller_base releases can be picked up immediately.
[tool.uv.exclude-newer-package]
flyteidl2 = "0 days"
flyte_controller_base = "0 days"
flyteplugins-union = "0 days"
# ty releases frequently pre-1.0; the type-checking config targets the latest rules.
ty = "0 days"
[tool.uv.sources]
flyte_controller_base = { path = "rs_controller" }
[tool.ty.rules]
# The codebase is checked by both mypy and ty; `# type: ignore` comments needed by
# one checker often look unused to the other, so don't flag them.
unused-ignore-comment = "ignore"
unused-type-ignore-comment = "ignore"
redundant-cast = "ignore"
possibly-missing-attribute = "error"
possibly-missing-import = "error"
# Examples import optional heavy dependencies (torch, sklearn, ...) that are not
# installed in the lint environment — same policy as mypy's ignore_missing_imports.
unresolved-import = "ignore"
[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git,.gitignore,.gitattributes,*.lock'
check-hidden = true
# Ignore embedded base64 images in notebooks
ignore-regex = '^\s*"image/\S+": ".*'
# ot - variable for output type, nd - NamedDelivery variable,
# crasher - legitimate word, tru - intentional truncated JSON in test,
# Nome - timezone "America/Nome", lits - short for "literals",
# rouge - NLP scoring metric (not "rogue")
ignore-words-list = 'ot,nd,crasher,tru,nome,lits,rouge'