-
Notifications
You must be signed in to change notification settings - Fork 9
/
pyproject.toml
119 lines (108 loc) · 3.74 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
[tool.poetry]
name = "docile-benchmark"
version = "0.3.4"
description = "Tools to work with the DocILE dataset and benchmark"
authors = [
"Stepan Simsa <[email protected]>",
"Matyas Skalicky <[email protected]>",
"Milan Sulc <[email protected]>",
"Michal Uricar <[email protected]>",
"Matej Kocian <[email protected]>",
"Yash Patel <[email protected]>",
]
readme = "README.md"
homepage = "https://docile.rossum.ai/"
repository = "https://github.com/rossumai/docile"
packages = [
{ include = "docile" },
]
[tool.poetry.dependencies]
python = ">=3.9,<3.13"
tqdm = "^4.64.1"
pdf2image = "^1.16.0"
pillow = ">=9.1.0"
networkx = {extras = ["default"], version = "^2.8.8"}
tabulate = "^0.9.0"
click = "^8.0.0"
# Optional dependencies included in the `extras` below
# interactive
jupyterlab = { version = "^3.5.0", optional = true }
ipywidgets = { version = "^8.0.4", optional = true }
plotly = { version = "^5.12.0", optional = true }
# ocr
python-doctr = { version = ">=0.6.0", optional = true }
torch = { version = ">=1.13.1", optional = true }
torchvision = { version = ">=0.14.1", optional = true }
opencv-python = { version = "^4.6.0.66", optional = true }
# baselines
transformers = { version = ">=4.26.1", extras = ["torch"], optional = true }
# pin datasets version to avoid https://github.com/apache/arrow/issues/34455
datasets = { version = "^2.8.0,<2.10.0", extras = ["s3"], optional = true }
torchmetrics = { version = "^0.11.0", optional = true }
sentencepiece = { version = "^0.1.97", optional = true }
tensorboard = { version = "^2.11.2", optional = true }
scikit-learn = { version = "^1.2.1", optional = true }
pytorch-lightning = { extras = ["extra"], version = "^1.8.3", optional = true }
timm = { version = "^0.6.11", optional = true }
# pin botocore otherwise poetry lock never finishes
botocore = { version = "^1.34.69", optional = true }
aiobotocore = { version = "^2.12.3" , optional = true }
[tool.poetry.extras]
interactive = ["jupyterlab", "ipywidgets", "plotly"]
ocr = ["python-doctr", "torch", "torchvision", "opencv-python"]
baselines = [
"torch",
"torchvision",
"transformers",
"datasets",
"torchmetrics",
"sentencepiece",
"tensorboard",
"scikit-learn",
"pytorch-lightning",
"timm",
"botocore",
"aiobotocore",
]
[tool.poetry.group.dev.dependencies]
pre-commit = "^2.20.0"
pytest = "^7.2.0"
[tool.poetry.scripts]
docile_evaluate = "docile.cli.evaluate:evaluate"
docile_print_evaluation_report = "docile.cli.evaluate:print_evaluation_report"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
line-length = 99
target-version = ["py39", "py310", "py311"]
include = '\.py$'
exclude = '/(\.git|\.mypy_cache|__pycache__|\.pytest_cache|data|docs|)/'
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 99
ensure_newline_before_comments = true
[tool.pydocstyle]
convention = "numpy"
# D202 - not compatible with black
add_ignore = ["D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107", "D202"]
match_dir = '^(?!\.).*\.py'
[tool.mypy]
pretty = true
show_error_codes = true
disallow_untyped_defs = true
warn_return_any = false
namespace_packages = true
ignore_missing_imports = true
disable_error_code = ["operator", "index", "var-annotated"]
[tool.codespell]
skip = "*.ipynb,tests/data/*"
# Using lower case for doubleClick: https://github.com/codespell-project/codespell/issues/2375
ignore-words-list = "doubleclick"