This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
pyproject.toml
168 lines (150 loc) · 4.45 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
[build-system]
requires = ["poetry>=1.0"]
build-backend = "poetry.masonry.api"
[tool.poetry]
name = "companion"
version = "0.1.1.dev0"
description = "Quack Companion API - type smarter, ship faster"
license = "Apache-2.0"
authors = ["François-Guillaume Fernandez <[email protected]>"]
maintainers = ["François-Guillaume Fernandez <[email protected]>"]
readme = "README.md"
repository = "https://github.com/quack-ai/companion"
keywords = ["backend", "api", "code contribution", "guidelines"]
[tool.poetry.dependencies]
python = "^3.9"
fastapi = ">=0.109.1,<1.0.0"
sqlmodel = "^0.0.16"
pydantic = ">=2.0.0,<3.0.0"
pydantic-settings = ">=2.0.0,<3.0.0"
requests = "^2.32.0"
PyJWT = "^2.8.0"
passlib = { version = "^1.7.4", extras = ["bcrypt"] }
uvicorn = ">=0.11.1,<1.0.0"
asyncpg = ">=0.25.0,<1.0.0"
alembic = "^1.8.1"
sentry-sdk = { version = "^1.14.0", extras = ["fastapi"] }
posthog = "^3.0.0"
prometheus-fastapi-instrumentator = "^6.1.0"
groq = "^0.5.0"
ollama = "^0.2.0"
openai = "^1.29.0"
uvloop = "^0.19.0"
httptools = "^0.6.1"
[tool.poetry.group.quality]
optional = true
[tool.poetry.group.quality.dependencies]
ruff = "==0.5.1"
mypy = "==1.10.0"
types-requests = ">=2.0.0"
types-urllib3 = ">=1.26.25"
types-passlib = ">=1.7.0"
sqlalchemy-stubs = "^0.4"
pre-commit = "^3.6.0"
[tool.poetry.group.demo]
optional = true
[tool.poetry.group.demo.dependencies]
gradio = "^4.37.1"
requests = "^2.32.0"
python-dotenv = "^1.0.0"
posthog = "^3.0.0"
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
pytest = ">=7.3.2,<9.0.0"
pytest-asyncio = ">=0.17.0,<1.0.0"
httpx = ">=0.23.0"
pytest-cov = "^4.0.0"
pytest-pretty = "^1.0.0"
[tool.coverage.run]
source = ["src/app"]
[tool.ruff]
line-length = 120
target-version = "py39"
preview = true
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"N", # pep8-naming
# "D101", "D103", # pydocstyle missing docstring in public function/class
"D201","D202","D207","D208","D214","D215","D300","D301","D417", "D419", # pydocstyle
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"CPY", # flake8-copyright
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"RET", # flake8-return
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PERF", # perflint
"NPY", # numpy
"FURB", # refurb
"RUF", # ruff specific
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"B904", # raise from
"C901", # too complex
"F403", # star imports
"E731", # lambda assignment
"C416", # list comprehension to list()
"ANN101", # missing type annotations on self
"ANN102", # missing type annotations on cls
"ANN002", # missing type annotations on *args
"ANN003", # missing type annotations on **kwargs
"COM812", # trailing comma missing
"ISC001", # implicit string concatenation (handled by format)
]
exclude = [".git"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.isort]
known-first-party = ["app", "tests"]
known-third-party = ["fastapi"]
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = ["I001", "F401", "CPY001"]
"scripts/**.py" = ["D", "T201", "S101", "ANN", "RUF030"]
".github/**.py" = ["D", "T201", "ANN"]
"src/tests/**.py" = ["D103", "CPY001", "S101", "T201", "ANN001", "ANN201", "ARG001", "RUF030"]
"src/migrations/versions/**.py" = ["CPY001"]
"src/migrations/**.py" = ["ANN"]
"client/tests/**.py" = ["D103", "CPY001", "S101"]
"src/app/main.py" = ["ANN"]
"src/app/schemas/**.py" = ["A"]
"src/app/models.py" = ["A"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.9"
mypy_path = "src/"
files = "src/app"
show_error_codes = true
pretty = true
warn_unused_ignores = true
warn_redundant_casts = true
no_implicit_optional = true
check_untyped_defs = true
implicit_reexport = false
explicit_package_bases = true
[[tool.mypy.overrides]]
module = ["posthog", "ollama"]
ignore_missing_imports = true