forked from gptme/gptme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
330 lines (286 loc) · 9.76 KB
/
pyproject.toml
File metadata and controls
330 lines (286 loc) · 9.76 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
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
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
[project]
name = "gptme"
version = "0.31.0"
description = "Powerful AI agent for coding and general tasks. Terminal-first with shell, code execution, file editing, web browsing, vision, computer use. Unconstrained."
authors = [
{ name = "Erik Bjäreholt", email = "erik@bjareho.lt" },
]
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
dynamic = ["dependencies"] # "version"
[project.urls]
Homepage = "https://gptme.org/"
Repository = "https://github.com/gptme/gptme"
Documentation = "https://gptme.org/docs/"
Issues = "https://github.com/gptme/gptme/issues"
[project.scripts]
gptme = "gptme.cli.main:main"
gptme-server = "gptme.server.cli:main"
gptme-acp = "gptme.acp.__main__:main"
gptme-eval = "gptme.eval.main:main"
gptme-eval-swebench = "gptme.eval.swebench.main:main"
gptme-util = "gptme.cli.util:main"
gptme-agent = "gptme.agent.cli:main"
gptme-doctor = "gptme.cli.doctor:main"
gptme-auth = "gptme.cli.auth:main"
gptme-onboard = "gptme.cli.onboard:main"
gptme-wut = "gptme.cli.wut:main"
gptme-dspy = "gptme.eval.dspy:main"
[tool.poetry]
packages = [
{ include = "gptme" },
]
include = ["gptme/server/static/**/*", "media/*.png", "media/*.wav"]
[tool.poetry.dependencies]
python = "^3.10"
click = "^8.0"
click-default-group = "^1.2.4"
python-dotenv = "^1.0.0"
rich = "^13.5.2"
tabulate = "*"
pick = {version = "^2.2.0", markers = "sys_platform != 'win32'"}
tiktoken = ">=0.7"
tomlkit = "*"
typing-extensions = "*"
platformdirs = "^4.3"
lxml = "*"
pypdf = ">=6.7.3" # For PDF text extraction in browser tool (CVE fix: RAM exhaustion + infinite loop)
requests = "^2.32" # For HTTP requests in browser tool (PDF detection)
json-repair = "^0.32.0"
mcp = "^1.13.0"
questionary = "^2.1.0"
python-dateutil = "^2.9.0.post0"
pyyaml = "^6.0.3"
# providers
openai = "^1.0"
anthropic = "^0.47"
# tools
ipython = "^8.17.2"
bashlex = "^0.18"
playwright = {version = "1.49.1", optional=true} # version constrained due to annoying to have to run `playwright install` on every update
youtube_transcript_api = {version = "^0.6.1", optional=true}
python-xlib = {version = "^0.33", optional=true} # for X11 interaction
# evals
multiprocessing-logging = "^0.3.4"
dspy = {version = "^3.0.2", python = "<=3.13", optional=true}
datasets = {version = ">=2.14.0", optional=true} # for SWE-bench eval
swebench = {version = ">=1.0", optional=true} # for SWE-bench eval harness
# datascience essentials
pillow = {version = "*"} # non-optional, needed for image scaling in vision
matplotlib = {version = "*", optional=true}
pandas = {version = "*", optional=true}
numpy = {version = "*", optional=true}
scipy = {version="*", optional=true}
sounddevice = {version="^0.5.1", optional=true}
# server
flask = {version = "^3.0", optional=true}
flask-cors = {version = ">=4,<6", optional=true}
pydantic = "^2.11.7"
# telemetry
opentelemetry-api = {version = "^1.20.0", optional=true}
opentelemetry-sdk = {version = "^1.20.0", optional=true}
opentelemetry-instrumentation-flask = {version = "^0.55b1", optional=true}
opentelemetry-instrumentation-requests = {version = "^0.55b1", optional=true}
opentelemetry-exporter-otlp = {version = "^1.34.1", optional=true}
opentelemetry-exporter-prometheus = {version = "^0.55b1", optional=true}
opentelemetry-instrumentation-anthropic = {version="^0.47.3", optional=true}
opentelemetry-instrumentation-openai = {version="^0.47.3", optional=true}
opentelemetry-instrumentation-threading = {version="^0.55b1", optional=true}
sentence-transformers = {version = "^5.1.2", optional=true}
# build
pyinstaller = {version="^6.15", python=">=3.10,<3.15", optional=true} # not yet compatible with Python 3.15+
# acp (Agent Client Protocol)
agent-client-protocol = {version = ">=0.7", optional=true, python=">=3.10,<3.15"}
[tool.poetry.group.dev.dependencies]
# lint
mypy = "*"
ruff = "*"
pylint = "*"
pre-commit = "*"
radon = "*"
openapi-spec-validator = "^0.7.2"
# test
pytest = "^8.0"
pytest-asyncio = "*"
pytest-cov = "*"
pytest-xdist = "^3.5.0"
pytest-profiling = "^1.7.0"
pytest-dotenv = "^0.5.2"
pytest-timeout = "^2.2.0"
pytest-retry = "^1.6.3"
pytest-mock = "*"
greenlet = "*" # dependency of playwright, but needed for coverage
# build
pyinstaller = {version="^6.15", python=">=3.10,<3.15"} # not yet compatible with Python 3.15+
# docs
sphinx = "^8.0"
sphinx-click = "^6.0"
sphinx-book-theme = "^1.0.1"
sphinx-sitemap = "^2.6.0"
sphinx-autobuild = "^2024.10.3"
sphinx-llms-txt = "^0.2.4"
sphinxcontrib-programoutput = "*"
sphinxcontrib-asciinema = "*"
sphinxcontrib-mermaid = "^1.0.0"
myst-parser = "*"
# types
types-tabulate = "*"
types-lxml = "*"
# needed for typechecking scripts
tomli = "^2.2.1"
[tool.poetry.extras]
server = ["flask", "flask-cors", "pydantic"]
browser = ["playwright"]
datascience = ["matplotlib", "pandas", "numpy"] # pillow (non-opt)
computer = [] # pillow (non-opt)
pyinstaller = ["pyinstaller"]
acp = ["agent-client-protocol"]
youtube = ["youtube_transcript_api"]
tts = ["sounddevice", "scipy", "numpy"]
telemetry = [
"opentelemetry-api", "opentelemetry-sdk",
"opentelemetry-exporter-otlp", "opentelemetry-exporter-prometheus",
"opentelemetry-instrumentation-flask", "opentelemetry-instrumentation-requests",
"opentelemetry-instrumentation-anthropic", "opentelemetry-instrumentation-openai",
"opentelemetry-instrumentation-threading",
]
dspy = ["dspy", "sentence-transformers"]
eval = ["dspy", "sentence-transformers", "datasets", "swebench"]
all = [
# server
"flask", "flask-cors", "pydantic",
# acp
"agent-client-protocol",
# browser
"playwright",
# datascience
"matplotlib", "pandas", "numpy", "scipy", # "pillow",
# computer
# "pillow",
# youtube transcript tool
"youtube_transcript_api",
# tts
"sounddevice", "scipy", "numpy",
# dspy prompt optimization
"dspy", "sentence-transformers",
# telemetry
"opentelemetry-api", "opentelemetry-sdk",
"opentelemetry-exporter-otlp", "opentelemetry-exporter-prometheus",
"opentelemetry-instrumentation-flask", "opentelemetry-instrumentation-requests",
"opentelemetry-instrumentation-anthropic", "opentelemetry-instrumentation-openai",
"opentelemetry-instrumentation-threading",
]
[tool.ruff]
target-version = "py310"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = [
"E4", "E7", "E9", # pycodestyle
"F", # pyflakes
"B", # flake8-bugbear
"UP", # pyupgrade
"I", # isort
"C4", # flake8-comprehensions
"FURB", # refurb
"FLY", # flynt (f-string over join)
"ISC", # implicit-str-concat
"PLE", # pylint errors
"PERF", # perflint
"RSE102", # unnecessary-paren-on-raise-exception
"SIM103", "SIM110", "SIM117", "SIM118", "SIM300", "SIM910", # flake8-simplify
"PIE790", "PIE810", # flake8-pie
"RET501", "RET505", "RET506", "RET507", "RET508", # flake8-return
"RUF010", "RUF019", "RUF100", # ruff-specific
"PLW1510", # subprocess-run-without-check
"TC001", "TC002", "TC003", "TC004", # flake8-type-checking
"PT003", "PT006", "PT011", "PT022", # pytest style
"DTZ", # flake8-datetimez (require timezone-aware datetimes)
]
ignore = ["E402", "E501", "B905", "PERF203"] # PERF203: try-except-in-loop often intentional
#fixable = ["ALL"]
#unfixable = ["B"]
[tool.mypy]
check_untyped_defs = true
disable_error_code = "import-untyped"
[[tool.mypy.overrides]]
module = "tomli_w"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "opentelemetry.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "langchain.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "matplotlib.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "numpy.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "scipy.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "sounddevice.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "acp.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "flask.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "dspy.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "chromadb.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "playwright.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "swebench.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "datasets.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "acp.*"
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"eval: marks tests as evals (deselect with '-m \"not eval\"'), these may fail, and will not run in CI",
"serial",
"timeout: marks tests with timeout value in seconds",
"requires_api: marks tests that require API access",
"flaky: marks tests as flaky (retried automatically)",
"integration: marks tests as integration tests requiring external services",
"xdist_group: marks tests that should run in the same xdist group",
]
[tool.coverage.run]
# Needed to get playwright to play nice with coverage
# https://stackoverflow.com/a/28589618/965332
concurrency = ["greenlet"]
#branch = true
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain if tests don't hit defensive assertion code
"raise NotImplementedError",
# Don't complain about interactive stuff
"except KeyboardInterrupt:",
"if interactive:",
"if ask:",
# Don't complain if non-runnable code isn't run:
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[build-system]
requires = ["poetry-core>=2.0"]
build-backend = "poetry.core.masonry.api"