-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
184 lines (169 loc) · 4.13 KB
/
pyproject.toml
File metadata and controls
184 lines (169 loc) · 4.13 KB
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
[build-system]
requires = ["setuptools>=75.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "flow_preprocessing"
dynamic = ["version"]
description = "Preprocessing Package for the Flow Project (flow-project.net)"
readme = { file = "README.md", content-type = "text/markdown" }
authors = [
{ name = "Dana Rebecca Meyer", email = "dameyer@techfak.uni-bielefeld.de" },
{ name = "Jonas Widmer", email = "jonas.widmer@unibe.ch" }
]
requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
license = "MIT"
dependencies = [
"flow-segmenter",
"pagexml-hf",
"lxml>=6.1.0",
"numpy",
"pillow>=12.1.1",
"pydantic",
"pyyaml",
"requests>=2.0.0",
"setuptools",
]
keywords = [
"flow-project",
"preprocessing",
"htrflow",
"digital-humanities",
"htr",
"handwritten-text-recognition",
"datasets",
"huggingface",
"nlp",
"machine-learning",
]
[dependency-groups]
dev = [
"ipywidgets>=8.1.8",
"jupyter>=1.1.1",
"jupyterlab>=4.5.5",
"lxml-stubs>=0.5.1",
"notebook>=7.5.4",
"types-pyyaml>=6.0.12.20260408",
]
[project.optional-dependencies]
dev = [
"pytest>=8.3.0",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"pytest-xdist>=3.6.1",
"black>=24.10.0",
"ruff>=0.8.0",
"mypy>=1.13.0",
"isort>=5.13.2",
"types-Pillow>=10.2.0",
"types-PyYAML>=6.0.12",
"lxml-stubs>=0.5.1",
]
docs = [
"sphinx>=8.1.0",
"sphinx-rtd-theme>=3.0.2",
"sphinx-autodoc-typehints>=2.5.0",
"myst-parser>=4.0.0",
]
[project.urls]
Homepage = "https://flow-project.net"
Repository = "https://github.com/The-Flow-Project/package-preprocessing"
[tool.uv.sources]
flow-segmenter = { git = "https://github.com/The-Flow-Project/package-segmenter" }
pagexml-hf = { git = "https://github.com/The-Flow-Project/pagexml-hf" }
[tool.black]
line-length = 96
target-version = ["py312"]
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.ruff]
line-length = 96
indent-width = 4
target-version = "py312"
lint.select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"PT", # flake8-pytest-style
"SIM", # flake8-simplify
]
lint.ignore = [
"E501", # line too long (handled by black)
"B008", # do not perform function calls in argument defaults
"UP045", # Replace Optional with pipe syntax
"B905", # `zip()` without an explicit `strict=` parameter
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # allow unused imports in __init__.py for better package exports
"tests/*" = ["S101", "PLR2004"]
[tool.isort]
profile = "black"
line_length = 96
skip_gitignore = true
indent = 4
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
ignore_missing_imports = true
exclude = ["build", "dist", "tests"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
pythonpath = ["src"]
addopts = "-v --strict-markers --tb=short --color=yes"
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow running tests",
"security: Security-related tests",
"performance: Performance tests",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
minversion = "3.12"
[tool.coverage.run]
source = ["src/flow_preprocessing"]
omit = ["tests/*", "**/__pycache__/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.setuptools.packages.find]
where = ["src"]
# packages = ["flow_preprocessing"]
[tool.setuptools.dynamic]
version = { attr = "flow_preprocessing.__version__" }