-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
132 lines (118 loc) · 3.52 KB
/
pyproject.toml
File metadata and controls
132 lines (118 loc) · 3.52 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
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "pylet"
version = "0.5.0"
description = "A simple distributed task execution system for GPU servers"
readme = "README.md"
license = "Apache-2.0"
authors = [
{ name = "Yao Fu", email = "yao.fu.aisys@gmail.com" }
]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: System :: Distributed Computing",
]
keywords = ["distributed", "gpu", "cluster", "task", "execution", "scheduling"]
dependencies = [
"fastapi>=0.100.0",
"uvicorn>=0.20.0",
"httpx>=0.24.0",
"pydantic>=2.0.0",
"click>=8.0.0",
"aiosqlite>=0.19.0",
"aiohttp>=3.8.0",
"tomli>=2.0.0; python_version < '3.11'",
]
[project.urls]
Homepage = "https://github.com/ServerlessLLM/pylet"
Repository = "https://github.com/ServerlessLLM/pylet"
Issues = "https://github.com/ServerlessLLM/pylet/issues"
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"ruff>=0.8.0",
"mypy>=1.14.0",
"pre-commit>=4.0.0",
]
[project.scripts]
pylet = "pylet.cli:cli"
[tool.setuptools]
packages = ["pylet"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
[dependency-groups]
dev = [
"black>=25.11.0",
"pytest>=8.4.2",
"pytest-asyncio>=1.2.0",
"ruff>=0.14.11",
"mypy>=1.14.0",
"pre-commit>=4.0.0",
]
[tool.ruff]
target-version = "py39"
line-length = 100
src = ["pylet", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults (needed for FastAPI Depends)
"B904", # raise from err (HTTP exceptions don't need chains)
"RUF022", # __all__ not sorted (intentionally grouped by category)
"SIM102", # nested if statements (sometimes clearer)
"SIM105", # use contextlib.suppress (style preference)
"SIM115", # use context manager for open (not always possible)
"SIM117", # use single with statement (nested sometimes clearer)
"UP035", # typing.X deprecated (need Optional, Union for Python 3.9 compat)
]
[tool.ruff.lint.isort]
known-first-party = ["pylet"]
[tool.mypy]
python_version = "3.9"
warn_return_any = false
warn_unused_ignores = true
disallow_untyped_defs = false
check_untyped_defs = true
ignore_missing_imports = true
strict_optional = true
files = ["pylet"]
exclude = ["tests"]
# Per-module overrides for stricter checking on core modules
[[tool.mypy.overrides]]
module = "pylet.schemas"
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = "pylet.errors"
disallow_untyped_defs = true
# db.py uses Optional[Connection] but methods assume connect() was called
[[tool.mypy.overrides]]
module = "pylet.db"
disable_error_code = ["union-attr"]