-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
298 lines (267 loc) · 7.33 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
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling",
]
[project]
name = "kitchenai"
dynamic = ["version"]
description = ""
readme = "README.md"
authors = [ { name = "epuerta", email = "esteban_puerta@rhinosearch.io" } ]
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"boto3",
"cookiecutter",
"crispy-tailwind",
"diskcache",
"django[argon2]",
"django-allauth[socialaccount]",
"django-allauth-ui",
"django-anymail[resend]",
"django-compressor",
"django-extensions",
"django-health-check",
"django-htmx",
"django-lifecycle",
"django-ninja",
"django-q-registry",
"django-q2",
"django-storages[s3]",
"django-tailwind-cli",
"django-template-partials",
"django-unique-user-email",
"django-widget-tweaks",
"djp",
"environs[django]",
"falco-toolbox",
"falco-ui",
"gunicorn",
"uvicorn",
"heroicons[django]",
"honcho",
"pillow",
"psycopg[binary]",
"pyyaml",
"refreshcss",
"rich",
"sentry-sdk",
"slippers",
"typer",
"whitenoise",
"posthog",
"nbformat",
"nbconvert",
"faststream[nats]",
"starlette",
"django-eventstream",
"nest_asyncio",
"django-model-utils",
"kitchenai-py",
"markdown2",
"aiohttp",
"redis",
"django-redis",
"temporalio",
"kitchenai_whisk",
"llama-index",
]
scripts.kitchenai = "kitchenai.__main__:main"
[tool.hatch.env]
requires = [
"hatch-pip-compile>=1.11.2",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
exclude = [
"static",
]
artifacts = [
"staticfiles",
]
[tool.hatch.build.targets.binary]
[[tool.hatch.envs.all.matrix]]
python = [ "3.11", "3.12", "3.13" ]
[tool.hatch.envs.default]
type = "pip-compile"
pip-compile-constraint = "default"
pip-compile-installer = "uv"
pip-compile-resolver = "uv"
lock-filename = "requirements.txt"
[tool.hatch.envs.dev]
dependencies = [
"django-browser-reload",
"django-debug-toolbar",
"dj-notebook>=0.6.1",
"Werkzeug[watchdog]>=3.0.1",
"django-stubs[compatible-mypy]",
"django-fastdev",
"coverage[toml]>=6.5",
"pre-commit",
"pytest",
"pytest-asyncio",
"pytest-django",
"pytest-sugar",
"pytest-xdist",
"falco-cli",
"django-watchfiles",
"git-cliff",
"bump-my-version",
"hatch-pip-compile",
"jupyterlab",
"django-seed",
]
lock-filename = "requirements-dev.txt"
[tool.hatch.envs.docs]
template = "dev"
extra-dependencies = [
"furo",
"sphinx",
"sphinx-autobuild",
"sphinx-copybutton",
"sphinx-design",
"myst-parser",
]
lock-filename = "docs/requirements.txt"
[tool.ruff]
lint.extend-ignore = [ "EM101", "I001", "I002", "RUF012", "TID252", "TRY003" ]
lint.extend-per-file-ignores."*/__main__.py" = [ "S104" ]
lint.extend-per-file-ignores."*/migrations/*" = [ "E501" ]
lint.extend-per-file-ignores."deploy/*" = [ "INP001" ]
lint.extend-per-file-ignores."docs/conf.py" = [ "A001", "INP001" ]
lint.extend-per-file-ignores."tests/**/*" = [ "ARG001", "PLR2004", "S101", "TID252" ]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "kitchenai.settings"
addopts = "--reuse-db -n auto"
norecursedirs = ".* bin build dist *.egg htmlcov logs node_modules static templates venv"
asyncio_default_fixture_loop_scope = "function"
# python_files = "tests.py test_*.py *_tests.py"
[tool.coverage.run]
source_pkgs = [ "kitchenai", "tests" ]
branch = true
parallel = true
[tool.coverage.paths]
kitchenai = [ "*/kitchenai/kitchenai" ]
tests = [ "tests", "*/kitchenai/tests" ]
[tool.coverage.report]
exclude_lines = [ "no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:" ]
[tool.bumpversion]
current_version = "0.16.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = [
"{major}.{minor}.{patch}",
]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
commit_args = "--no-verify"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'
[tool.mypy]
python_version = "3.11"
check_untyped_defs = true
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
plugins = [ "mypy_django_plugin.main" ]
[[tool.mypy.overrides]]
ignore_errors = true
module = [
"allauth.*",
"boto3.*",
"botocore.*",
"debug_toolbar.*",
"django_filters.*",
"django_q.*",
"djclick.*",
"gunicorn.*",
"health_check.*",
"*.migrations.*",
]
[tool.django-stubs]
django_settings_module = "kitchenai.settings"
[tool.falco]
htmx = "kitchenai/static/vendors/htmx/htmx.min.js:2.0.2"
revision = "5ffa1f8e00881e1a2d77700ee1748664324d73d5"
skip = [ "playground.ipynb", "README.md", "*/static/*" ]
blueprint = "https://github.com/falcopackages/starter-template"
[tool.falco.work]
server = "python manage.py migrate && python manage.py runserver {address}"
tailwind = "python manage.py tailwind watch"
worker = "python manage.py qcluster"
[tool.falco.crud]
[tool.mypy_django_plugin]
ignore_missing_model_attributes = true
[tool.git-cliff.changelog]
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
footer = """
<!-- generated by git-cliff -->
"""
trim = true
[tool.git-cliff.git]
conventional_commits = true
filter_unconventional = true
split_commits = false
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^app", group = "<!-- 0 -->🚀 Applications" },
{ message = "^plugins", group = "<!-- 0 -->🚀 Plugins" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc|^docs", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^build", group = "<!-- 7 -->📦 Build" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore|^ci", group = "<!-- 8 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 9 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 10 -->◀️ Revert" },
]
protect_breaking_commits = false
filter_commits = false
topo_order = false
sort_commits = "oldest"
[tool.uv.workspace]
members = ["python_libraries/kitchenai-llama"]
[tool.hatch.version]
path = "kitchenai/__version__.py"