-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
429 lines (391 loc) · 9.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
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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=65.5.1",
]
[project]
name = "query-package-documentation"
version = "0.0.3"
description = "A package to explore documentations"
keywords = [
"documentation",
"generative-ai",
]
license = { file = "LICENSE" }
maintainers = [
{ name = "Anirban Ray", email = "[email protected]" },
]
authors = [
{ name = "Anirban Ray", email = "[email protected]" },
]
requires-python = "==3.11.*"
classifiers = [
"Development Status :: 3 - Alpha",
"Framework :: Flake8",
"Framework :: Pydantic",
"Framework :: Sphinx",
"Intended Audience :: Developers",
"License :: OSI Approved",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
"Typing :: Typed",
]
dynamic=[
"readme",
]
dependencies = [
"chromadb<0.5,>=0.4.15",
"ctransformers<0.3,>=0.2.27",
"gradio<4.26,>=4.19.2",
"jq<1.8,>=1.6",
"langchain<0.2,>=0.1.13",
"numpydoc<1.8,>=1.6",
"pydantic<2.7,>=2.4.2",
"sentence-transformers<2.7,>=2.2.2",
"transformers<4.39,>=4.36",
"typer-slim<0.13,>=0.12.1",
]
[project.optional-dependencies]
all = [
"autoflake",
"bandit",
"black",
"blacken-docs",
"build",
"codespell",
"docformatter[tomli]",
"flake8",
"furo",
"interrogate",
"isort",
"myst-parser[linkify]",
"numpydoc",
"pre-commit",
"pylint",
"pyproject-fmt",
"pyupgrade",
"Sphinx",
"sphinx-copybutton",
"twine",
"validate-pyproject",
"vulture",
]
dev = [
"codespell",
"numpydoc",
"pre-commit",
]
doc = [
"furo",
"myst-parser[linkify]",
"Sphinx",
"sphinx-copybutton",
]
fine-tuning = [
"accelerate<0.30,>=0.24.1",
"bitsandbytes<0.44,>=0.41.2",
"datasets<2.19,>=2.15",
"evaluate<0.5,>=0.4.1",
"peft<0.11,>=0.6.2",
"rouge-score<0.2,>=0.1.2",
"safetensors<0.5,>=0.4",
"scikit-learn<1.5,>=1.3",
"torch<2.3,>=2.1.1",
"trl<0.9,>=0.7.4",
]
format = [
"autoflake",
"black",
"blacken-docs",
"docformatter[tomli]",
"isort",
"pyproject-fmt",
"pyupgrade",
]
lint = [
"bandit",
"flake8",
"interrogate",
"pylint",
"validate-pyproject",
"vulture",
]
release = [
"build",
"twine",
]
[project.urls]
"Bug Tracker" = "https://github.com/yarnabrina/query-package-documentation/issues"
"Documentation" = "https://query-package-documentation.readthedocs.io"
"Source Code" = "https://github.com/yarnabrina/query-package-documentation"
[project.scripts]
docs-cli = "cli:CLI_APPLICATION"
[project.gui-scripts]
docs-gui = "gui:main"
[tool.setuptools]
py-modules = [
"cli",
"gui",
]
[tool.setuptools.dynamic]
readme = { file = "README.md", content-type = "text/markdown" }
[tool.setuptools.packages.find]
where = [
"src",
]
include = [
"generative_ai*",
]
namespaces = false
[tool.setuptools.package-data]
"generative_ai" = [
"metadata.json",
"py.typed",
]
[tool.setuptools.exclude-package-data]
"*" = [
".gitattributes",
".gitignore",
]
[tool.black]
line-length = 99
target-version = [
"py311",
]
[tool.ruff]
fix = true
indent-width = 4
line-length = 99
output-format = "grouped"
preview = false
respect-gitignore = true
src = [
"docs",
"src",
"tests",
]
target-version = "py311"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = "dynamic"
indent-style = "space"
preview = false
quote-style = "double"
[tool.ruff.lint]
fixable = [
"ALL",
]
ignore = [
"COM", # flake8-commas
"CPY", # flake8-copyright
"D213", # Multi-line docstring summary should start at the second line
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"G", # flake8-logging-format
"ICN", # flake8-import-conventions
"PD", # pandas-vet
"RET501", # Do not explicitly return None in function if it is the only possible return value
"RET502", # Do not implicitly return None in function able to return non-None value
"RET503", # Missing explicit return at the end of function able to return non-None value
"RET504", # Unnecessary assignment to {name} before return statement
"TID252", # Prefer absolute imports over relative imports from parent modules
"TRY003", # Avoid specifying long messages outside the exception class
]
ignore-init-module-imports = true
preview = false
select = [
"ALL",
]
task-tags = [
"TODO",
"FIXME",
]
[tool.ruff.lint.flake8-annotations]
ignore-fully-untyped = true
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Query",
"pydantic.Field",
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
[tool.ruff.lint.flake8-type-checking]
exempt-modules = [
"typing",
"typing_extensions",
]
quote-annotations = true
runtime-evaluated-base-classes = [
"pydantic.BaseModel",
]
runtime-evaluated-decorators = [
"pydantic.validate_call",
]
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
"pydantic.field_validator",
]
[tool.ruff.lint.per-file-ignores]
"src/**/__init__.py" = [
"F401", # {name} imported but unused; consider using importlib.util.find_spec to test for availability
]
"docs/**/conf.py" = [
"INP001", # File {filename} is part of an implicit namespace package. Add an __init__.py.
]
"tests/**/conftest.py" = [
"INP001", # File {filename} is part of an implicit namespace package. Add an __init__.py.
"PLR0913", # Too many arguments in function definition ({c_args} > {max_args})
]
"tests/**/test_*.py" = [
"INP001", # File {filename} is part of an implicit namespace package. Add an __init__.py.
"PLR0913", # Too many arguments in function definition ({c_args} > {max_args})
"S101", # Use of assert detected
]
[tool.ruff.lint.pycodestyle]
max-doc-length = 99
max-line-length = 99
[tool.ruff.lint.pydocstyle]
convention = "numpy"
ignore-decorators = [
"typing.overload",
]
property-decorators = [
"pydantic.computed_field",
]
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.isort]
overwrite_in_place = true
profile = "black"
atomic = true
line_length = 99
remove_redundant_aliases = true
src_paths = [
"src",
]
py_version = 311
[tool.pylint.main]
extension-pkg-allow-list = [
"pydantic",
]
fail-under = 8.5
jobs = 0
recursive = true
[tool.pylint.basic]
include-naming-hint = true
[tool.pylint.format]
max-line-length = 99
[tool.pylint.logging]
logging-format-style = "new"
[tool.pylint."messages control"]
enable = [
"all",
]
disable = [
"import-outside-toplevel", # Used when an import statement is used anywhere other than the module toplevel. Move this import to the top of the file.
"logging-fstring-interpolation", # Used when a logging statement has a call form of "logging.<logging method>(f"...")".Use another type of string formatting instead. You can use % formatting but leave interpolation to the logging function by passing the parameters as arguments. If logging-format-interpolation is disabled then you can use str.format. If logging-not-lazy is disabled then you can use % formatting as normal.
]
[tool.pylint.reports]
output-format = "colorized"
[tool.docformatter]
in-place = true
recursive = true
wrap-summaries = 99
wrap-descriptions = 99
[tool.pytest.ini_options]
addopts = "--junit-xml=pytest_junit_report.xml --doctest-modules --doctest-ignore-import-errors --doctest-continue-on-failure"
console_output_style = "count"
[tool.coverage.run]
branch = true
command_line = "--module pytest"
data_file = "coverage_data"
include = [
"src/**/*.py",
]
omit = [
"tests/**/conftest.py",
"tests/**/test_*.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"if typing.TYPE_CHECKING:",
]
fail_under = 85
include = [
"src/**/*.py",
]
include_namespace_packages = true
omit = [
"tests/**/conftest.py",
"tests/**/test_*.py",
]
precision = 2
show_missing = true
[tool.coverage.html]
directory = "coverage_html_report"
[tool.coverage.xml]
output = "coverage_xml_report.xml"
[tool.mypy]
files = [
"src",
]
exclude = [
"conftest",
"test_",
]
strict = true
[tool.pyright]
include = [
"src",
]
exclude = [
"tests/**/conftest.py",
"tests/**/test_*.py",
]
pythonVersion = "3.11"
reportMissingImports = false
[tool.autoflake]
in-place = true
remove-all-unused-imports = true
recursive = true
expand-star-imports = true
ignore-init-module-imports = true
remove-duplicate-keys = true
remove-unused-variables = true
[tool.interrogate]
fail-under = 85
ignore-init-method = true
[tool.vulture]
min_confidence = 100
paths = [
"src",
]
[tool.numpydoc_validation]
checks = [ # Report findings on all checks except the ones listed below "all"
"all",
"GL01", # Docstring text (summary) should start in the line immediately after the opening quotes (not in the same line, or leaving a blank line in between)
"ES01", # No extended summary found
"PR08", # Parameter "{param_name}" description should start with a capital letter
"PR09", # Parameter "{param_name}" description should finish with "."
"RT04", # Return value description should start with a capital letter
"RT05", # Return value description should finish with "."
"SA01", # See Also section not found
"EX01", # No examples section found
]
exclude = [ # Don't report issues on objects matching any of the regular regular expressions
"\\.__init__$",
]