-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathpyproject.toml
140 lines (127 loc) · 3.61 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
[project]
name = "kreuzberg"
version = "2.1.0"
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",
"tesseract",
"text-extraction",
"text-processing",
]
license = { text = "MIT" }
authors = [ { name = "Na'aman Hirschfeld", email = "[email protected]" } ]
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.8.0",
"charset-normalizer>=3.4.1",
"exceptiongroup>=1.2.2; python_version<'3.11'",
"html-to-markdown>=1.2.0",
"pypdfium2>=4.30.1",
"python-calamine>=0.3.1",
"python-pptx>=1.0.2",
"typing-extensions>=4.12.2; python_version<'3.11'",
]
urls.homepage = "https://github.com/Goldziher/kreuzberg"
[dependency-groups]
dev = [
"covdefaults>=2.3.0",
"mypy>=1.15.0",
"pre-commit>=4.1.0",
"pytest>=8.3.4",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"pytest-timeout>=2.3.1",
"ruff>=0.9.6",
"trio>=0.29.0",
]
[tool.setuptools.packages.find]
include = [ "kreuzberg" ]
[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",
"PGH003",
"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",
]
[tool.coverage.run]
omit = [ "tests/*", "scripts/*" ]
plugins = [ "covdefaults" ]
source = [ "kreuzberg" ]
[tool.coverage.report]
exclude_lines = [ 'if TYPE_CHECKING:', "except ImportError:" ]
fail_under = 100
[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]
playa-pdf = { git = "https://github.com/dhdaines/playa", rev = "main" }