-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
209 lines (188 loc) · 6.2 KB
/
pyproject.toml
File metadata and controls
209 lines (188 loc) · 6.2 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
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[dependency-groups]
dev = [
"beautifulsoup4>=4.13.4",
"freezegun>=1.5.5",
"httpx>=0.28.1",
"mypy>=1.15.0",
"pytest-cov>=6.2.1",
"pytest-playwright-asyncio>=0.7.1",
"pytest-randomly>=4.0.1",
"pytest-timeout>=2.4.0",
"pytest-watcher>=0.4.3",
"ruff>=0.11.10",
"syrupy>=4.9.1",
"types-pyyaml>=6.0.12.20250915",
]
[project]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.12",
] # https://pypi.org/classifiers/
dependencies = [
"anyio>=4.11.0",
"beartype>=0.22.2",
"duckdb==1.4.2",
"jinja2>=3.1.4",
"python-multipart>=0.0.20",
"pyyaml>=6.0.2",
"starlette>=0.47.0",
"uvicorn>=0.34.2",
]
description = "Yak Shears Web App"
license = "MIT"
maintainers = []
name = "yak_shears"
repository = "https://github.com/KyleKing/yak-shears-py"
requires-python = ">=3.12.9"
version = "0.0.0"
[project.scripts] # Docs: https://setuptools.pypa.io/en/latest/userguide/entry_point.html#console-scripts
serve = "yak_shears.server:cli"
yak-shears-users = "yak_shears.cli:main_sync"
[tool.coverage.html]
directory = "htmlcov"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
precision = 2
show_missing = true
skip_covered = false
[tool.coverage.run]
branch = true
omit = ["*/tests/*", "*/__pycache__/*", "*/.venv/*"]
source = ["yak_shears"]
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
enable_error_code = ["ignore-without-code", "possibly-undefined", "redundant-expr", "truthy-bool"]
extra_checks = true
files = ["tests", "yak_shears"]
no_implicit_reexport = true
plugins = [
]
python_version = "3.12"
show_column_numbers = true
show_error_codes = true
strict_equality = true
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.pyright]
include = ["tests", "tests-e2e", "yak_shears"]
pythonVersion = "3.12"
[tool.pytest.ini_options]
# FYI: browser is required for non-E2E test as well
addopts = "tests --strict-markers --durations=5 --browser=chromium --timeout=10"
asyncio_default_test_loop_scope = "session"
markers = [
"playwright: e2e browser tests",
"allow_console_errors: allow console errors in browser tests (e.g., expected 400 responses)",
]
[tool.pytest-watcher]
clear = true
ignore_patterns = []
now = true
patterns = ["*.jinja", "*.json", "*.py"]
runner = "pytest"
runner_args = ["--exitfirst", "--last-failed", "--new-first", "--no-cov", "-vv"]
[tool.ruff]
# Docs: https://github.com/charliermarsh/ruff
# Tip: uv run ruff rule RUF100
line-length = 120
target-version = 'py312'
[tool.ruff.lint]
ignore = [
'ANN002', # Missing type annotation for `*args`
'ANN003', # Missing type annotation for `**kwargs`
'ANN401', # Dynamically typed expressions (typing.Any) are disallowed in `pop_key`
'BLE001', # Do not catch blind exception: `Exception`
'COM812', # ruff formatter enforces consistent use of trailing commas, making the rule redundant
'CPY001', # Missing copyright notice at top of file
'D203', # "1 blank line required before class docstring" (Conflicts with D211)
'D213', # "Multi-line docstring summary should start at the second line" (Conflicts with D212)
'DOC501', # Raised exception `RuntimeError` missing from docstring
'EM101', # Exception must not use a string literal, assign to variable first
'FIX001', # Line contains FIXME
'FIX002', # Line contains TODO
'FIX004', # Line contains HACK
'PLR0913', # Too many arguments in function definition (6 > 5)
'TC001', # Move application import `tail_jsonl.config.Config` into a type-checking block (Conflicts with Beartype)
'TC002', # Move third-party import `rich.console.Console` into a type-checking block (Conflicts with Beartype)
'TC003', # Move standard library import `argparse` into a type-checking block (Conflicts with Beartype)
'TD001', # Invalid TODO tag: `FIXME`
'TD002', # Missing author in TODO; try: `# TODO(<author_name>): ...`
'TD003', # Missing issue link on the line following this TODO
'TRY003', # Avoid specifying long messages outside the exception class
]
preview = true
select = ['ALL']
unfixable = [
'ERA001', # Commented out code
'T201', # print
]
[tool.ruff.lint.isort]
known-first-party = ['yak_shears']
[tool.ruff.lint.per-file-ignores]
'spikes/*.py' = [
'S101', # Use of `assert` detected
'T201', # print
]
'tests/*.py' = [
'ANN001', # Missing type annotation for function argument
'ANN201', # Missing return type annotation for public function
'ANN202', # Missing return type annotation for private function `test_make_diffable`
'ARG001', # Unused function argument: `line`
'ARG002', # Unused method argument: `temp_user_file`
'D100', # Missing docstring in public module
'D101', # Missing docstring in public class
'D102', # Missing docstring in public method
'D103', # Missing docstring in public function
'DOC201', # `return` is not documented in docstring
'DOC402', # `yield` is not documented in docstring
'PLC2701', # Private name import `_<>` from external module
'PLR6301', # Method `test_main_no_command` could be a function, class method, or static method
'PT004', # flake8-pytest-style: fixture does not return
'S101', # Use of `assert` detected
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.tomlsort]
in_place = true
sort_inline_arrays = false
sort_inline_tables = true
sort_table_keys = true
trailing_comma_inline_array = true
[tool.uv]
required-version = ">=0.8.22"
# pytorch-uv guide: https://docs.astral.sh/uv/guides/integration/pytorch/#using-a-pytorch-index
[[tool.uv.index]]
explicit = true
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
[[tool.uv.index]]
explicit = true
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
[tool.uv.sources]
torch = [
{index = "pytorch-cpu", marker = "sys_platform != 'linux'"},
{index = "pytorch-cu128", marker = "sys_platform == 'linux'"},
]
[tool.uv.workspace]
members = [
"agent-research-platform",
]