-
-
Notifications
You must be signed in to change notification settings - Fork 186
/
pyproject.toml
193 lines (166 loc) · 4.7 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
[tool.poetry]
name = "gptme"
version = "0.24.1"
description = "Personal AI assistant in your terminal that can use the shell, run code, edit files, browse the web, and use vision. An unconstrained local alternative to ChatGPT's Code Interpreter."
authors = ["Erik Bjäreholt <[email protected]>"]
readme = "README.md"
license = "MIT"
packages = [
{ include = "gptme" },
]
include = ["gptme/server/static/**/*", "media/logo.png"]
[project]
name = "gptme"
dependencies = [
"python = \"^3.10\"",
"click = \"^8.0\"",
"python-dotenv = \"^1.0.0\"",
"rich = \"^13.5.2\"",
"tabulate = \"*\"",
"pick = \"^2.2.0\"",
"tiktoken = \">=0.7\"",
"tomlkit = \"*\"",
"typing-extensions = \"*\"",
"platformdirs = \"^4.3\"",
"lxml = \"*\"",
"ipython = \"^8.17.2\"",
"bashlex = \"^0.18\"",
]
[project.scripts]
gptme = "gptme.cli:main"
gptme-server = "gptme.server.cli:main"
gptme-eval = "gptme.eval.main:main"
gptme-util = "gptme.util.cli:main"
gptme-nc = "gptme.ncurses:main"
[tool.poetry.scripts]
gptme = "gptme.cli:main"
gptme-server = "gptme.server.cli:main"
gptme-eval = "gptme.eval.main:main"
gptme-util = "gptme.util.cli:main"
gptme-nc = "gptme.ncurses:main"
[tool.poetry.dependencies]
python = "^3.10"
click = "^8.0"
python-dotenv = "^1.0.0"
rich = "^13.5.2"
tabulate = "*"
pick = "^2.2.0"
tiktoken = ">=0.7"
tomlkit = "*"
typing-extensions = "*"
platformdirs = "^4.3"
lxml = "*"
json-repair = "^0.30.2"
# providers
openai = "^1.0"
anthropic = "*"
# tools
ipython = "^8.17.2"
bashlex = "^0.18"
playwright = {version = "1.47.*", 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"
# datascience essentials
matplotlib = {version = "*", optional=true}
pandas = {version = "*", optional=true}
numpy = {version = "*", optional=true}
pillow = {version = "*", optional=true}
# server
flask = {version = "^3.0", optional=true}
flask-cors = {version = ">=4,<6", optional=true}
[tool.poetry.group.dev.dependencies]
# lint
mypy = "*"
ruff = "*"
pylint = "*"
pre-commit = "*"
# test
pytest = "^8.0"
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
# docs
sphinx = "^8.0"
sphinx-click = "^6.0"
sphinx-book-theme = "^1.0.1"
sphinxcontrib-programoutput = "^0.17"
sphinxcontrib-asciinema = "^0.4.2"
myst-parser = "*"
# types
types-tabulate = "*"
types-lxml = "*"
[tool.poetry.extras]
server = ["flask", "flask-cors"]
browser = ["playwright"]
datascience = ["matplotlib", "pandas", "numpy", "pillow"]
computer = ["python-xlib", "pillow"] # pillow already in datascience but listed for clarity
youtube = ["youtube_transcript_api"]
all = [
# server
"flask", "flask-cors",
# browser
"playwright",
# datascience
"matplotlib", "pandas", "numpy", "pillow",
# computer
"python-xlib",
# youtube transcript tool
"youtube_transcript_api",
]
[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", "F", "B", "UP"]
ignore = ["E402", "E501", "B905"]
#fixable = ["ALL"]
#unfixable = ["B"]
[tool.mypy]
check_untyped_defs = true
disable_error_code = "import-untyped"
[[tool.mypy.overrides]]
module = "langchain.*"
ignore_missing_imports = true
[tool.pytest.ini_options]
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",
]
[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:",
]
# TODO: migrate to PEP 621 once supported by poetry
#[project]
#name = "gptme"
#dynamic = ["version"]
#
#[tool.setuptools.dynamic]
#version = {attr = "mymodule.__version__"}
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"