-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
105 lines (89 loc) · 2.77 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
[tool.poetry]
name = "voice_assistant"
version = "0.1.0"
description = "A multi-modal agent platform."
authors = ["Vikash Agrawal <[email protected]>"]
readme = "README.md"
packages = [{include = "voice_assistant", from = "src"}]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = "^3.11"
fastapi = "^0.112.0"
httpx = "^0.27.0"
loguru = "^0.7.2"
python-dotenv = "^1.0.1"
uvicorn = "^0.30.5"
[tool.poetry.group.dev.dependencies]
bandit = "^1.7.9"
interrogate = "^1.7.0"
mypy = "^1.11.1"
poethepoet = "^0.27.0"
poetry-plugin-sort = "^0.2.1"
pytest = "^8.3.2"
pytest-asyncio = "^0.24.0"
pytest-cov = "^5.0.0"
pytest-watch = "^4.2.0"
ruff = "^0.5.6"
[tool.poe.tasks]
lint = "poetry run ruff check"
lint_docstring = "poetry run interrogate -vv"
lint_fix = "poetry run ruff check --fix"
lint_format = "poetry run ruff format"
lint_security_analysis = "poetry run bandit -r src"
lint_types = "poetry run mypy ."
pre_commit = "lefthook run pre-commit -f"
start = "poetry run uvicorn src.voice_assistant.app:app --host 0.0.0.0 --port 6226 --ssl-keyfile=./certs/cert-key.pem --ssl-certfile=./certs/cert.pem"
test = "poetry run pytest tests"
test_watch = "poetry run ptw"
[tool.interrogate]
exclude = ["tests"]
fail-under=100
ignore-init-module=true
ignore-nested-classes=true
ignore-nested-functions=true
ignore-private=true
ignore-property-decorators=true
ignore-semiprivate=true
[tool.mypy]
files = ["src", "tests"]
[tool.ruff]
extend-exclude = ["__pycache__"]
line-length = 90
src = ["src", "tests"]
target-version = "py311"
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
extend-select = [
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"EXE", # flake8-executable
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"RET", # flake8-return
"RUF", # Ruff-specific
"S", # flake8-bandit
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT",] # flake8-2020
ignore = [
"C408", "C416", # Unnecessary `dict` call (rewrite as a literal)
"PLR", # Design related pylint codes
"RUF012"] # Mutable class attributes should be annotated with `typing.ClassVar`
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"