-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
128 lines (113 loc) · 2.56 KB
/
pyproject.toml
File metadata and controls
128 lines (113 loc) · 2.56 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
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "docfinder"
version = "2.1.0"
license = "AGPL-3.0-or-later"
description = "Local-first semantic search CLI for your documents (PDF, DOCX, Markdown, TXT)."
authors = [
{ name = "DocFinder Team" }
]
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"pymupdf>=1.24.0",
"sentence-transformers>=2.6.0",
"onnxruntime>=1.17.0",
"optimum>=2.0.0",
# pin numpy to <2 to avoid runtime errors with precompiled C-extensions
# that may not yet be compatible with NumPy 2.x. Projects installing
# DocFinder from scratch will get a NumPy 1.x compatible release.
"numpy>=1.26.0,<3",
"typer[all]>=0.12.0",
"rich>=13.7.0",
"tqdm>=4.66.0",
"mpmath<1.4",
"python-docx>=1.1.0"
]
[project.optional-dependencies]
dev = [
"pytest>=8.2.0",
"pytest-cov>=5.0.0",
"ruff>=0.5.0",
"safety>=3.0.0",
"bandit[toml]>=1.7.0",
"pyinstaller>=6.0.0"
]
web = [
"fastapi>=0.115.0",
"uvicorn[standard]>=0.32.0",
"pydantic>=2.9.0"
]
gui = [
"pywebview>=5.0.0",
"fastapi>=0.115.0",
"uvicorn[standard]>=0.32.0",
"pydantic>=2.9.0",
"pynput>=1.7.0",
"pyobjc-framework-Cocoa>=9.0; sys_platform == 'darwin'"
]
rag = [
"llama-cpp-python>=0.3.0",
]
gpu = [
"onnxruntime-gpu>=1.17.0"
]
[project.scripts]
docfinder = "docfinder.cli:app"
docfinder-gui = "docfinder.gui:main"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
"docfinder.web" = ["templates/*.html"]
[tool.typer]
app = "docfinder.cli:app"
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "W", "I"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["E501"] # Ignore line-too-long in test files
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--cov=docfinder",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
]
[tool.coverage.run]
source = ["src/docfinder"]
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/site-packages/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstract",
]
precision = 2
show_missing = true
[tool.bandit]
exclude_dirs = ["tests", "build", "dist"]
skips = ["B101", "B601"]