-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
257 lines (218 loc) · 6.46 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "google-sheets"
description = "google-sheets: A simple Google Sheets API made for usage with FastAgency"
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 = [
"pydantic>=2.3,<3",
"fastapi>=0.110.2",
"prisma==0.13.1",
"google-api-python-client==2.154.0",
"asyncify==0.10.0",
"pandas==2.2.3"
]
[project.optional-dependencies]
# public distributions
server = [
"uvicorn==0.32.1",
]
# dev dependencies
lint = [
"types-PyYAML",
"types-setuptools",
"types-ujson",
"types-Pygments",
"types-docutils",
"mypy==1.13.0",
"ruff==0.8.1",
"pyupgrade-directories==0.3.0",
"bandit==1.8.0",
"semgrep==1.97.0",
"pytest-mypy-plugins==3.1.2",
]
test-core = [
"coverage[toml]==7.6.8",
"pytest==8.3.4",
"pytest-asyncio==0.24.0",
]
testing = [
"google-sheets[test-core]",
"google-sheets[server]", # Uvicorn is needed for testing
]
dev = [
"google-sheets[server,lint,testing]",
"pre-commit==4.0.1",
"detect-secrets==1.5.0",
]
[project.urls]
Tracker = "https://github.com/airtai/google-sheets/issues"
Source = "https://github.com/airtai/google-sheets"
Discord = "https://discord.gg/qFm6aSqq59"
[project.scripts]
# google_sheets = "google_sheets.__main__:cli"
[tool.hatch.version]
path = "google_sheets/__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 = ["google_sheets"]
[tool.hatch.build.targets.wheel.sources]
"src" = ""
# "scripts" = "google_sheets/templates"
[tool.mypy]
files = ["google_sheets", "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 = ["google_sheets/**/*.py", "google_sheets/**/*.pyi", "tests/**/*.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",
]
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
parallel = true
branch = true
concurrency = [
"multiprocessing",
"thread"
]
source = [
"google_sheets",
# "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
)/
"""