-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (155 loc) · 4.92 KB
/
pyproject.toml
File metadata and controls
177 lines (155 loc) · 4.92 KB
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
[project]
name = "ai-doc-assistant"
version = "0.2.0"
description = "AI-powered documentation assistant"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"chromadb>=1.0.17",
"litestar>=2.16.0",
"llama-cpp-python>=0.3.15",
"pydantic>=2.11.7",
"pypdf>=5.9.0",
"sentence-transformers>=5.1.0",
"uvicorn>=0.35.0",
]
[dependency-groups]
dev = [
"pytest-asyncio>=1.1.0",
"pytest-coverage>=0.0",
]
[tool.pyright]
pythonVersion = "3.13"
venv = ".venv"
venvPath = "."
typeCheckingMode = "basic" # Options: "off", "basic", "strict"
include = ["src", "tests"]
exclude = ["**/node_modules", "**/__pycache__", "**/*.pyc"]
reportMissingImports = true # Report missing imports
reportUnusedImports = true # Report unused imports
reportUnusedFunction = true # Report unused functions
[tool.black]
line-length = 88
target-version = ["py313"]
include = '\.pyi?$'
exclude = '''(
/(
.git
| .mypy_cache
| .pytest_cache
| build
| dist
)/
)'''
skip-string-normalization = true
fast = false
[tool.ruff]
line-length = 88
indent-width = 4
target-version = "py313"
exclude = ["docs/**/*.py"]
[tool.ruff.format]
indent-style = "space"
line-ending = "auto"
quote-style = "single"
skip-magic-trailing-comma = false
[tool.ruff.lint]
# select = ["E4", "E7", "E9", "F", "W", "E", "B", "I", "PL", "C90"]
select = ["E4", "E7", "E9", "F"]
ignore = []
fixable = ["ALL"]
unfixable = ["B"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.flake8-bugbear]
# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`.
extend-immutable-calls = [
"Depends",
"fastapi.Depends",
"fastapi.params.Depends",
]
[tool.pytest.ini_options]
# https://docs.pytest.org/en/latest/reference/customize.html
minversion = "6.0"
addopts = [
# "-v",
# "-q",
"--tb=short", # line, auto, short, long, native, no
"--capture=no",
"--log-cli-level=INFO",
"--import-mode=importlib",
"--maxfail=10",
# "--disable-warnings",
# "--doctest-modules",
# "--cov=losa",
]
testpaths = ["tests/unit", "tests/e2e"]
pythonpath = ["src"]
log_format = "%(asctime)s [%(levelname)-8s] [%(filename)s:%(lineno)s] %(message)s"
log_date_format = "%H:%M:%S"
asyncio_default_fixture_loop_scope = "function"
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::RuntimeWarning:unittest.mock",
"ignore:.*coroutine.*was never awaited.*:RuntimeWarning",
]
# Reminder:
# '^file1\.py$', # TOML literal string (single-quotes, no escaping necessary)
# "^file2\\.py$", # TOML basic string (double-quotes, backslash and other characters need escaping
[tool.bandit]
targets = ["src"]
exclude_dirs = ["tests", ".venv"]
skips = ["B101", "B301", "B601"]
[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
exclude = [
'^file1\.py$', # TOML literal string (single-quotes, no escaping necessary)
"^file2\\.py$", # TOML basic string (double-quotes, backslash and other characters need escaping)
]
[tool.pylint.main]
# Specify a score threshold under which the program will exit with error.
fail-under = 10
# Files or directories to be skipped. They should be base names, not paths.
ignore = [
".venv",
".git",
"__pycache__",
"dist",
"build",
".mypy_cache",
".pytest_cache",
"tests",
"docs",
"examples",
"scripts",
]
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs = 0
# Minimum Python version to use for version dependent checks. Will default to the
# version used to run pylint.
py-version = "3.13"
[tool.pylint."messages control"]
# Disable the message, report, category or checker with the given id(s). You can
# either give multiple identifiers separated by comma (,) or put this option
# multiple times (only on the command line, not in the configuration file where
# it should appear only once). You can also use "--disable=all" to disable
# everything first and then re-enable specific checks. For example, if you want
# to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable = ["C"]
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where it
# should appear only once). See also the "--disable" option for examples.
enable = [ ]
[tool.pylint.reports]
# Set the output format. Available formats are: 'text', 'parseable', 'colorized',
# 'json2' (improved json format), 'json' (old json format), msvs (visual studio)
# and 'github' (GitHub actions). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format = "colorized"