-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
pyproject.toml
177 lines (162 loc) · 4.38 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
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "onnxtr"
description = "Onnx Text Recognition (OnnxTR): docTR Onnx-Wrapper for high-performance OCR on documents."
authors = [{name = "Felix Dittrich", email = "[email protected]"}]
maintainers = [
{name = "Felix Dittrich"},
]
readme = "README.md"
requires-python = ">=3.10.0,<4"
license = {file = "LICENSE"}
keywords=["OCR", "deep learning", "computer vision", "onnx", "text detection", "text recognition", "docTR", "document analysis", "document processing", "document AI"]
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dynamic = ["version"]
dependencies = [
# For proper typing, mypy needs numpy>=1.20.0 (cf. https://github.com/numpy/numpy/pull/16515)
# Additional typing support is brought by numpy>=1.22.4, but core build sticks to >=1.16.0
"numpy>=1.16.0,<3.0.0",
"scipy>=1.4.0,<2.0.0",
"pypdfium2>=4.11.0,<5.0.0",
"pyclipper>=1.2.0,<2.0.0",
"shapely>=1.6.0,<3.0.0",
"rapidfuzz>=3.0.0,<4.0.0",
"langdetect>=1.0.9,<2.0.0",
"huggingface-hub>=0.23.0,<1.0.0",
"Pillow>=9.2.0",
"defusedxml>=0.7.0",
"anyascii>=0.3.2",
"tqdm>=4.30.0",
]
[project.optional-dependencies]
cpu = [
"onnxruntime>=1.11.0",
"opencv-python>=4.5.0,<5.0.0",
]
gpu = [
"onnxruntime-gpu>=1.11.0",
"opencv-python>=4.5.0,<5.0.0",
]
cpu-headless = [
"onnxruntime>=1.11.0",
"opencv-python-headless>=4.5.0,<5.0.0",
]
gpu-headless = [
"onnxruntime-gpu>=1.11.0",
"opencv-python-headless>=4.5.0,<5.0.0",
]
html = [
"weasyprint>=55.0",
]
viz = [
"matplotlib>=3.1.0",
"mplcursors>=0.3",
]
testing = [
"pytest>=5.3.2",
"coverage[toml]>=4.5.4",
"requests>=2.20.0",
]
quality = [
"ruff>=0.1.5",
"mypy>=0.812",
"pre-commit>=2.17.0",
]
dev = [
# Runtime
"onnxruntime>=1.11.0",
"opencv-python>=4.5.0,<5.0.0",
# HTML
"weasyprint>=55.0",
# Visualization
"matplotlib>=3.1.0",
"mplcursors>=0.3",
# Testing
"pytest>=5.3.2",
"coverage[toml]>=4.5.4",
"requests>=2.20.0",
# Quality
"ruff>=0.1.5",
"mypy>=0.812",
"pre-commit>=2.17.0",
]
[project.urls]
repository = "https://github.com/felixdittrich92/OnnxTR"
tracker = "https://github.com/felixdittrich92/OnnxTR/issues"
changelog = "https://github.com/felixdittrich92/OnnxTR/releases"
[tool.setuptools]
zip-safe = true
[tool.setuptools.packages.find]
exclude = ["docs*", "tests*", "scripts*", "demo*"]
[tool.setuptools.package-data]
onnxtr = ["py.typed"]
[tool.mypy]
files = "onnxtr/"
show_error_codes = true
pretty = true
warn_unused_ignores = true
warn_redundant_casts = true
no_implicit_optional = true
check_untyped_defs = true
implicit_reexport = false
[[tool.mypy.overrides]]
module = [
"onnxruntime.*",
"PIL.*",
"scipy.*",
"cv2.*",
"matplotlib.*",
"numpy.*",
"pyclipper.*",
"shapely.*",
"mplcursors.*",
"defusedxml.*",
"weasyprint.*",
"pypdfium2.*",
"langdetect.*",
"huggingface_hub.*",
"rapidfuzz.*",
"anyascii.*",
"tqdm.*",
]
ignore_missing_imports = true
[tool.ruff]
exclude = [".git", "venv*", "build", "**/__init__.py"]
line-length = 120
target-version = "py310"
preview=true
[tool.ruff.lint]
select = [
# https://docs.astral.sh/ruff/rules/
"E", "W", "F", "I", "N", "Q", "C4", "T10", "LOG",
"D101", "D103", "D201","D202","D207","D208","D214","D215","D300","D301","D417", "D419", "D207" # pydocstyle
]
ignore = ["E402", "E203", "F403", "E731", "N812", "N817", "C408", "LOG015"]
[tool.ruff.lint.isort]
known-first-party = ["onnxtr", "utils"]
known-third-party = ["onnxruntime", "cv2"]
[tool.ruff.lint.per-file-ignores]
"onnxtr/models/**.py" = ["N806", "F841"]
"tests/**.py" = ["D"]
"scripts/**.py" = ["D"]
"demo/**.py" = ["D"]
".github/**.py" = ["D"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.coverage.run]
source = ["onnxtr"]