forked from mindee/doctr
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
185 lines (174 loc) · 4.79 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
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "python-doctr"
description = "Document Text Recognition (docTR): deep Learning for high-performance OCR on documents."
authors = [{name = "Mindee", email = "contact@mindee.com"}]
maintainers = [
{name = "François-Guillaume Fernandez"},
{name = "Charles Gaillard"},
]
readme = "README.md"
requires-python = ">=3.6.0,<4"
license = {file = "LICENSE"}
keywords=["OCR", "deep learning", "computer vision", "tensorflow", "pytorch", "text detection", "text recognition"]
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.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dynamic = ["version"]
dependencies = [
"importlib_metadata",
# 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,<2.0.0",
"scipy>=1.4.0,<2.0.0",
"h5py>=3.1.0,<4.0.0",
"opencv-python>=4.5.0,<5.0.0",
"pyclipper>=1.2.0,<2.0.0",
"shapely>=1.6.0,<2.0.0",
"langdetect>=1.0.9,<2.0.0",
"matplotlib>=3.1.0",
"weasyprint>=52.2",
"Pillow>=8.3.2", # cf. https://github.com/advisories/GHSA-98vv-pw6r-q6q4
"defusedxml>=0.7.0",
"mplcursors>=0.3",
"unidecode>=1.0.0",
"tqdm>=4.30.0",
"rapidfuzz>=1.6.0",
"huggingface-hub>=0.4.0",
"openvino==2022.3.1"
]
[project.optional-dependencies]
tf = [
"tensorflow>=2.9.0,<3.0.0", # cf. https://github.com/mindee/doctr/issues/454
"tensorflow-addons>=0.17.1",
"tf2onnx>=1.9.2",
]
torch = [
"torch>=1.13.0",
"torchvision>=0.14.0",
"timm>=0.5.4",
"nltk>=3.8",
"pytorch-lightning>=1.8.6",
"lightning-utilities>=0.5.0"
]
testing = [
"pytest>=5.3.2",
"coverage[toml]>=4.5.4",
"hdf5storage>=0.1.18",
"requests>=2.20.0",
]
quality = [
"flake8>=3.9.0",
"isort>=5.7.0",
"black>=22.1,<23.0",
"mypy>=0.812",
"pydocstyle[toml]>=6.1.1",
]
docs = [
"sphinx>=3.0.0,!=3.5.0",
"sphinxemoji>=0.1.8",
"sphinx-copybutton>=0.3.1",
"docutils<0.18",
"recommonmark>=0.7.1",
"sphinx-markdown-tables>=0.0.15",
"sphinx-tabs>=3.3.0",
"furo>=2022.3.4",
]
dev = [
# Tensorflow
"tensorflow>=2.9.0,<3.0.0", # cf. https://github.com/mindee/doctr/issues/454
"tensorflow-addons>=0.17.1",
"tf2onnx>=1.9.2",
# PyTorch
"torch>=1.8.0",
"torchvision>=0.9.0",
# Testing
"pytest>=5.3.2",
"coverage[toml]>=4.5.4",
"hdf5storage>=0.1.18",
"requests>=2.20.0",
# Quality
"flake8>=3.9.0",
"isort>=5.7.0",
"black>=22.1,<23.0",
"mypy>=0.812",
"pydocstyle[toml]>=6.1.1",
# Docs
"sphinx>=3.0.0,!=3.5.0",
"sphinxemoji>=0.1.8",
"sphinx-copybutton>=0.3.1",
"docutils<0.18",
"recommonmark>=0.7.1",
"sphinx-markdown-tables>=0.0.15",
"sphinx-tabs>=3.3.0",
"furo>=2022.3.4",
]
[project.urls]
documentation = "https://mindee.github.io/doctr"
repository = "https://github.com/mindee/doctr"
tracker = "https://github.com/mindee/doctr/issues"
changelog = "https://github.com/mindee/doctr/latest/changelog.html"
[tool.setuptools]
zip-safe = true
[tool.setuptools.packages.find]
exclude = ["api*", "demo*", "docs*", "notebooks*", "references*", "scripts*", "tests*"]
[tool.mypy]
files = "doctr/"
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 = [
"tensorflow.*",
"torchvision.*",
"PIL.*",
"tqdm.*",
"scipy.*",
"cv2.*",
"h5py.*",
"matplotlib.*",
"tensorflow_addons.*",
"pyclipper.*",
"shapely.*",
"tf2onnx.*",
"mplcursors.*",
"defusedxml.*",
"weasyprint.*",
"huggingface_hub.*",
"rapidfuzz.*",
"langdetect.*",
]
ignore_missing_imports = true
[tool.isort]
profile = "black"
line_length = 120
src_paths = ["doctr", "tests", "scripts", "references", "demo", "docs", "api"]
skip_glob = "**/__init__.py"
known_third_party = ["tensorflow", "torch", "torchvision", "wandb", "fastprogress"]
[tool.pydocstyle]
select = "D300,D301,D417"
match = ".*\\.py"
[tool.coverage.run]
source = ["doctr"]
[tool.black]
line-length = 120
target-version = ['py38']