-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
268 lines (227 loc) · 7.19 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "fastagency-studio"
description = "FastAgency: a repository of open-source AI agents"
readme = "README.md"
authors = [
{ name = "airt", email = "[email protected]" },
]
keywords = ["autogen", "multi-agent", "LLM", "AI", "autonomous agents"]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development",
"Typing :: Typed",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Environment :: Web Environment",
"Framework :: AsyncIO",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
]
dynamic = ["version"]
dependencies = [
"fastagency @ git+https://github.com/airtai/fastagency.git@main",
"faststream[nats]>=0.5.10,<0.6",
"pydantic>=2.3,<3",
"fastapi==0.115.4",
"prisma>=0.13.1,<0.16",
"asyncer==0.0.8",
"markdownify==0.13.1", # Needed by autogen.WebSurferAgent but not included
"httpx==0.27.2",
"python-weather==2.0.7", # should be removed when we move API to another project
]
[project.optional-dependencies]
# public distributions
submodules = [
"fastagency[submodules] @ git+https://github.com/airtai/fastagency.git@main",
]
server = [
"fastagency[server] @ git+https://github.com/airtai/fastagency.git@main",
]
# dev dependencies
devdocs = [
"fastagency[devdocs] @ git+https://github.com/airtai/fastagency.git@main",
]
lint = [
"fastagency[lint] @ git+https://github.com/airtai/fastagency.git@main",
]
test-core = [
"fastagency[test-core] @ git+https://github.com/airtai/fastagency.git@main",
]
testing = [
"fastagency-studio[submodules]",
"fastagency-studio[test-core]",
"fastagency-studio[server]", # Uvicorn is needed for testing
"fastagency[testing] @ git+https://github.com/airtai/fastagency.git@main",
]
dev = [
"fastagency-studio[submodules,server,lint,testing,devdocs]",
"fastagency[dev] @ git+https://github.com/airtai/fastagency.git@main",
]
[project.urls]
Homepage = "https://studio.fastagency.ai/"
Documentation = "https://studio.fastagency.ai/"
Tracker = "https://github.com/airtai/fastagency-studio/issues"
Source = "https://github.com/airtai/fastagency-studio"
Discord = "https://discord.gg/qFm6aSqq59"
[project.scripts]
# fastagency-studio = "fastagency_studio.__main__:cli"
[tool.hatch.version]
path = "fastagency_studio/__about__.py"
[tool.hatch.build]
skip-excluded-dirs = true
exclude = [
"/tests",
"/docs",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
only-include = ["fastagency_studio"]
[tool.hatch.build.targets.wheel.sources]
"src" = ""
# "scripts" = "fastagency_studio/templates"
[tool.mypy]
files = ["fastagency_studio", "tests"]
strict = true
python_version = "3.9"
ignore_missing_imports = true
install_types = true
non_interactive = true
plugins = [
"pydantic.mypy",
]
# from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
disallow_untyped_defs = true
no_implicit_optional = true
check_untyped_defs = true
warn_return_any = true
show_error_codes = true
warn_unused_ignores = false
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_any_unimported = false
[tool.ruff]
fix = true
line-length = 88
# target-version = 'py39'
include = ["fastagency_studio/**/*.py", "fastagency_studio/**/*.pyi", "tests/**/*.py", "docs/**/*.py", "pyproject.toml"]
exclude = ["docs/docs_src"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors https://docs.astral.sh/ruff/rules/#error-e
"W", # pycodestyle warnings https://docs.astral.sh/ruff/rules/#warning-w
"C90", # mccabe https://docs.astral.sh/ruff/rules/#mccabe-c90
"N", # pep8-naming https://docs.astral.sh/ruff/rules/#pep8-naming-n
"D", # pydocstyle https://docs.astral.sh/ruff/rules/#pydocstyle-d
"I", # isort https://docs.astral.sh/ruff/rules/#isort-i
"F", # pyflakes https://docs.astral.sh/ruff/rules/#pyflakes-f
"ASYNC", # flake8-async https://docs.astral.sh/ruff/rules/#flake8-async-async
"C4", # flake8-comprehensions https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"B", # flake8-bugbear https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"Q", # flake8-quotes https://docs.astral.sh/ruff/rules/#flake8-quotes-q
"T20", # flake8-print https://docs.astral.sh/ruff/rules/#flake8-print-t20
"SIM", # flake8-simplify https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"PT", # flake8-pytest-style https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
"PTH", # flake8-use-pathlib https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"TCH", # flake8-type-checking https://docs.astral.sh/ruff/rules/#flake8-type-checking-tch
"RUF", # Ruff-specific rules https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"PERF", # Perflint https://docs.astral.sh/ruff/rules/#perflint-perf
]
ignore = [
"E501", # line too long, handled by formatter later
"D100", "D101", "D102", "D103", "D104",
# "C901", # too complex
]
[tool.ruff.lint.isort]
case-sensitive = true
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-bugbear]
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-q -m 'not slow'"
testpaths = [
"tests",
]
markers = [
"slow",
"all",
"db",
"nats",
"anthropic",
"azure_oai",
"openai",
"togetherai",
"llm: mark test for use with LLMs",
"flaky: mark test as flaky",
]
[tool.coverage.run]
parallel = true
branch = true
concurrency = [
"multiprocessing",
"thread"
]
source = [
"docs/docs_src",
"examples",
"fastagency_studio",
# "tests",
]
context = '${CONTEXT}'
omit = [
"**/__init__.py",
]
[tool.coverage.report]
show_missing = true
skip_empty = true
sort = "miss"
exclude_also = [
"if __name__ == .__main__.:",
"self.logger",
"def __repr__",
"lambda: None",
"from .*",
"import .*",
'@(abc\.)?abstractmethod',
"raise NotImplementedError",
'raise AssertionError',
'logger\..*',
"pass",
'\.\.\.',
]
omit = [
'*/__about__.py',
'*/__main__.py',
'*/__init__.py',
]
[tool.bandit]
[tool.black]
line-length = 88
extend-exclude = """
/(
docs/docs_src
| some_other_dir
)/
"""