-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathpyproject.toml
178 lines (167 loc) · 4.7 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
[project]
name = "kreuzberg"
version = "3.1.4"
description = "A text extraction library supporting PDFs, images, office documents and more"
readme = "README.md"
keywords = [
"document-processing",
"image-to-text",
"ocr",
"pandoc",
"pdf-extraction",
"rag",
"table-extraction",
"tesseract",
"text-extraction",
"text-processing",
]
license = { text = "MIT" }
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: General",
"Topic :: Utilities",
"Typing :: Typed",
]
dependencies = [
"anyio>=4.9.0",
"charset-normalizer>=3.4.1",
"exceptiongroup>=1.2.2; python_version<'3.11'",
"html-to-markdown>=1.3.2",
"playa-pdf>=0.4.1",
"pypdfium2==4.30.0", # pinned due to bug in 4.30.1, until v5 is stable
"python-calamine>=0.3.2",
"python-pptx>=1.0.2",
"typing-extensions>=4.13.2; python_version<'3.12'",
]
optional-dependencies.all = [
# easyocr
"easyocr>=1.7.2",
# gmft
"gmft>=0.4.1",
# paddle
"paddleocr>=2.10.0",
"paddlepaddle>=3.0.0",
# chunking
"semantic-text-splitter>=0.25.1",
"setuptools>=79.0.1",
]
optional-dependencies.chunking = [
"semantic-text-splitter>=0.25.1",
]
optional-dependencies.easyocr = [
"easyocr>=1.7.2",
]
optional-dependencies.gmft = [
"gmft>=0.4.1",
]
optional-dependencies.paddleocr = [
"paddleocr>=2.10.0",
"paddlepaddle>=3.0.0",
"setuptools>=79.0.1",
]
urls.homepage = "https://github.com/Goldziher/kreuzberg"
[dependency-groups]
dev = [
"covdefaults>=2.3.0",
"mypy>=1.15.0",
"pre-commit>=4.2.0",
"pytest>=8.3.5",
"pytest-cov>=6.1.1",
"pytest-mock>=3.14.0",
"pytest-timeout>=2.3.1",
"ruff>=0.11.7",
"trio>=0.30.0",
"uv-bump",
]
doc = [
"mkdocs>=1.6.1",
"mkdocs-git-revision-date-localized-plugin>=1.4.5",
"mkdocs-material[imaging]>=9.6.9",
"mkdocs-minify-plugin>=0.8.0",
"mkdocstrings[python]>=0.29.0",
]
[tool.setuptools.package-data]
kreuzberg = [ "py.typed" ]
[tool.ruff]
target-version = "py39"
line-length = 120
src = [ "kreuzberg", "tests" ]
format.docstring-code-line-length = 120
format.docstring-code-format = true
lint.select = [ "ALL" ]
lint.ignore = [
"ANN401", # Dynamically typed ANY for kwargs
"COM812", # Conflicts with formatter
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D107", # Missing docstring in __init__
"D205", # 1 blank line required between summary line and description
"E501", # Line too long, handled by ruff format
"EM", # Exception messages,
"FBT", # Boolean-typed positional argument in function definition
"FIX", # We allow todo and fixme comments
"ISC001", # Conflicts with formatter
"TD", # We allow todo and fixme comments
"TRY", # Try except block, rules are too strict
]
lint.per-file-ignores."tests/**/*.*" = [
"ARG001",
"D",
"N815",
"PD",
"PGH003",
"PLR0915",
"PLR2004",
"PT006",
"PT007",
"PT013",
"RUF012",
"S",
"SLF001",
]
lint.isort.known-first-party = [ "kreuzberg", "tests" ]
lint.mccabe.max-complexity = 15
lint.pydocstyle.convention = "google"
lint.pylint.max-args = 10
lint.pylint.max-branches = 15
lint.pylint.max-returns = 10
[tool.pyproject-fmt]
keep_full_version = true
max_supported_python = "3.13"
[tool.pytest.ini_options]
filterwarnings = [
"ignore:Exception ignored in:pytest.PytestUnraisableExceptionWarning",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
"ignore:ast.Num is deprecated and will be removed in Python 3.14:DeprecationWarning",
"ignore:datetime.datetime.utcfromtimestamp() is deprecated:DeprecationWarning",
"ignore:Deprecated call to `pkg_resources.declare_namespace('google')`:DeprecationWarning",
]
[tool.coverage.run]
omit = [ "tests/*", "scripts/*" ]
plugins = [ "covdefaults" ]
source = [ "kreuzberg" ]
[tool.coverage.report]
exclude_lines = [ 'if TYPE_CHECKING:', "except ImportError:" ]
fail_under = 95
[tool.mypy]
packages = [ "kreuzberg", "tests" ]
python_version = "3.9"
disable_error_code = 'import-untyped'
implicit_reexport = false
show_error_codes = true
strict = true
[tool.uv.sources]
uv-bump = { git = "https://github.com/Goldziher/uv-bump" }