-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
209 lines (178 loc) · 4.98 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
[build-system]
requires = ["flit_core>=3.2", "flit_scm", "wheel"]
build-backend = "flit_scm:buildapi"
[project]
name = "OpenSam"
authors = [
{ name = "Johannes Maron", email = "[email protected]" },
]
readme = "README.md"
license = { file = "LICENSE" }
keywords = ["GPT", "AI", "Slack", "OpenAI", "bot"]
dynamic = ["version", "description"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Programming Language :: Python",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development",
"Topic :: Communications :: Chat",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Communications :: Email",
"Topic :: Games/Entertainment :: Role-Playing",
"Topic :: Multimedia :: Sound/Audio :: Conversion",
"Topic :: Multimedia :: Sound/Audio :: Speech",
"Topic :: Office/Business",
"Topic :: Office/Business :: Groupware",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Human Machine Interfaces",
"Topic :: Text Processing :: Markup :: Markdown",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.11"
dependencies = [
"aiohttp",
"click",
"certifi",
"markdownify",
"redis",
"requests",
"slack-bolt",
"openai>=1.21.0",
"pyyaml",
"algoliasearch>=4.4.0",
"sentry-sdk",
]
[project.scripts]
sam = "sam.__main__:cli"
[project.optional-dependencies]
test = [
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-env",
"psycopg",
]
lint = [
"black==24.10.0",
"pre-commit==4.0.1",
"ruff==0.7.2",
]
docs = [
"pydoc-markdown",
"mkdocs-material",
"pymdown-extensions",
]
postgres = [
"psycopg",
]
[project.urls]
Project-URL = "https://github.com/voiio/Sam/"
Documentation = "https://code.voiio.de/Sam/"
Changelog = "https://github.com/voiio/Sam/releases"
[tool.flit.module]
name = "sam"
[tool.setuptools_scm]
write_to = "sam/_version.py"
fallback_version = "1.0.0"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--tb=short -rxs"
testpaths = ["tests"]
[tool.pytest_env]
GITHUB_REPOS = 'voiio/sam'
BRAVE_SEARCH_LATITUDE = '37.7749'
BRAVE_SEARCH_LONGITUDE = '-122.4194'
FROM_EMAIL = "Sam <[email protected]>"
GROUNDHOG_DAY_MODE = "true"
[tool.coverage.run]
source = ["sam"]
[tool.coverage.report]
show_missing = true
[tool.ruff]
src = ["sam", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"S", # flake8-bandit
"D", # pydocstyle
"UP", # pyupgrade
"B", # flake8-bugbear
"C", # flake8-comprehensions
]
ignore = ["B904", "D1", "E501", "S101"]
[tool.ruff.lint.isort]
combine-as-imports = true
split-on-trailing-comma = true
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
force-wrap-aliases = true
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[[tool.pydoc-markdown.loaders]]
type = "python"
search_path = ["."]
[tool.pydoc-markdown.renderer]
type = "mkdocs"
output_directory = "."
content_directory_name = "docs"
[tool.pydoc-markdown.hooks]
pre-render = [
"mkdir -p docs",
"cp screenshot.png docs",
"cp slack-manifest.yml docs",
]
[tool.pydoc-markdown.renderer.mkdocs_config]
site_name = "Sam"
theme = "material"
markdown_extensions = [
"pymdownx.highlight",
"pymdownx.inlinehilite",
"pymdownx.snippets",
"pymdownx.superfences",
]
[[tool.pydoc-markdown.renderer.pages]]
title = "Setup"
name = "index"
source = "README.md"
[[tool.pydoc-markdown.renderer.pages]]
title = "Usage"
name = "usage"
source = "USAGE.md"
[[tool.pydoc-markdown.renderer.pages]]
title = "Configuration"
name = "config"
contents = [
"sam.config.*",
"sam.contrib.algolia.config.*",
"sam.contrib.brave.config.*",
"sam.contrib.github.config.*",
]
[tool.sam.tools.send_email]
path = "sam.tools:send_email"
additional_instructions = "You may ask for confirmation before sending an email."
[tool.sam.tools.fetch_website]
path = "sam.tools:fetch_website"
additional_instructions = "You may fetch multiple websites and browse the sites."
[tool.sam.tools.fetch_coworker_contacts]
path = "sam.slack:fetch_coworker_contacts"
[tool.sam.tools.web_search]
path = "sam.contrib.brave.tools:search"
additional_instructions = "You MUST ALWAYS always fetch a website and read it."
[tool.sam.tools.create_github_issue]
path = "sam.contrib.github.tools:create_github_issue"
additional_instructions = "You MUST ALWAYS write the issue in English."
[tool.sam.tools.platform_search]
path = "sam.contrib.algolia.tools:search"
additional_instructions = "The voiio platform should be searched before searching the web."
[tool.sam.tools.fetch_data_warehouse_sql]
path = "sam.contrib.postgres.tools:fetch_all"
additional_instructions = "You MUST ALWAYS LIMIT the number of rows fetched. May fetch the schema before fetching data."