forked from Haidra-Org/AI-Horde
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
193 lines (176 loc) · 4.57 KB
/
Copy pathpyproject.toml
File metadata and controls
193 lines (176 loc) · 4.57 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
# SPDX-FileCopyrightText: 2022 Konstantinos Thoukydidis <mail@dbzer0.com>
# SPDX-FileCopyrightText: 2023 Tazlin
#
# SPDX-License-Identifier: AGPL-3.0-or-later
[project]
name = "AI-Horde"
version = "5.0.3"
description = "A Crowdsourced Generative AI cluster for everyone."
authors = [
{name = "db0", email = "mail@dbzer0.com"},
{name = "Tazlin", email = "tazlin@haidra.net"},
]
readme = "README.md"
requires-python = ">=3.12,<3.14"
dependencies = [
"Werkzeug~=2.2.2",
"Flask~=2.2.2",
"flask-restx",
"flask-limiter~=3.0",
"Flask-Caching",
"waitress~=2.1.2",
"requests>=2.27",
"markdown~=3.4.1",
"flask-dance[sqla]",
"blinker",
"python-dotenv",
"loguru",
"bleach~=5.0.1",
"alt-profanity-check",
"safetext",
"python-dateutil~=2.8.2",
"redis~=4.3.5",
"pillow>=10.0.1",
"flask-sqlalchemy~=3.1.1",
"oauthlib~=3.2.2",
"sqlalchemy~=2.0.35",
"psycopg2-binary",
"boto3>=1.33.7",
"regex",
"unidecode",
"patreon @ git+https://github.com/Patreon/patreon-python.git",
"torch",
"emoji",
"semver>=3.0.2",
# numpy is transitive (not imported by horde/*). The former `~=1.26.4` cap
# existed solely because better_profanity broke on numpy 2.x; that dep is
# gone (replaced by safetext + alt-profanity-check) so the cap was dropped.
# The resolved version is pinned deterministically by uv.lock (currently 2.x).
"numpy",
"markdownify",
"stripe<15",
"environs",
"setuptools<82",
# logfire is hard-pinned deliberately: the OTel/Logfire bridge API is not yet
# stable across minors and our telemetry wiring (horde/telemetry.py) is tested
# against this exact version. Bump only with a telemetry smoke re-run.
"logfire[flask,sqlalchemy,redis,requests]==4.32.1",
"chardet<6",
]
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU Affero General Public License v3",
]
[project.urls]
"Homepage" = "https://aihorde.net"
"Bug Tracker" = "https://github.com/Haidra-Org/AI-Horde"
[dependency-groups]
dev = [
"pytest==9.0.2",
"ruff==0.15.12",
"tox~=4.14.1",
"pytest-asyncio",
"pytest-cov",
"fakeredis",
"freezegun",
"testcontainers[postgres,redis]",
"mypy",
"pip-audit",
"reuse",
"pre-commit",
"locust>=2.43.4",
]
# Optional runtime group used by the Dockerfile's AI_HORDE_DEPENDENCY_GROUPS
# build arg. Keep profiler wheels out of the default image; publish/use the
# telemetry image variant when PYROSCOPE_ENABLED=true.
telemetry-profiling = [
"pyroscope-io",
"pyroscope-otel",
]
[tool.uv.sources]
torch = { index = "pytorch-cpu" }
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.ruff]
line-length = 140
lint.select = [
#"A",
"I",
"E",
"W",
"F",
"UP",
"YTT",
#"B",
#"C4",
"PIE",
#"RET",
#"SIM",
"COM",
# "D",
#"ANN"
]
lint.ignore = [
"COM812", # The following rule may cause conflicts when used with the formatter: `COM812`. To avoid unexpected behavior, we recommend disabling this rule
# Ignore D rules for non-google docstring standard
"D203",
"D204",
"D213",
"D215",
"D400",
"D404",
"D406",
"D407",
"D408",
"D409",
"D413",]
[tool.ruff.lint.per-file-ignores]
"horde/sandbox.py" = ["F401"]
"server.py" = ["E402"]
[tool.black]
line-length = 140
include = '\.pyi?$'
[tool.pytest.ini_options]
testpaths = ["tests/unit"]
markers = [
"unit: Unit tests (in-process; Postgres + fakeredis via fixtures)",
"integration: Integration tests (in-process Flask client; real services via fixtures)",
"object_storage: Integration tests that require S3-compatible object storage",
]
[tool.coverage.run]
branch = true
source = ["horde"]
omit = [
"horde/templates/*",
"horde/data/*",
"horde/sandbox.py",
]
[tool.coverage.report]
show_missing = true
skip_covered = false
precision = 1
[tool.coverage.xml]
output = "coverage.xml"
[tool.mypy]
# Permissive baseline so existing untyped modules don't block adoption.
# Files explicitly listed under [[tool.mypy.overrides]] with strict = true
# form the "typed allowlist".
python_version = "3.12"
ignore_missing_imports = true
follow_imports = "silent"
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
# --- Strict allowlist ---
# Rule of thumb: a module joins this list when its public surface is fully
# typed AND mypy passes strict on it.
[[tool.mypy.overrides]]
module = [
"horde.telemetry",
"horde.metrics",
]
strict = true