Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
119 lines (102 loc) · 2.98 KB
/
Copy pathpyproject.toml
File metadata and controls
119 lines (102 loc) · 2.98 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
[project]
name = "htrflow"
version = "0.2.6"
description = "htrflow is developed at Riksarkivet's AI-lab as an open-source package to simplify HTR"
readme = "README.md"
license = {file = "LICENSE"}
authors = [{email = "ai@riksarkivet.se"}]
keywords = ["htr", "htrflow", "ocr"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
requires-python = ">=3.10,<3.14"
dependencies = [
"jinja2 >= 3.1.5",
"numpy",
"opencv-python-headless >=4.11.0.86",
"tqdm >=4.66.2,<5",
"xmlschema >=3.0.2,<4",
"typer>=0.12.0",
"rich >=13.7.1",
"jiwer >=4.0",
"transformers >=4.47",
"torch >= 2.6",
"huggingface-hub >=0.28.1",
"ultralytics >=8.3.74",
"pydantic>=2.10.6",
"quality-prediction[modeling]>=0.1.1"
]
[project.urls]
Documentation = "https://ai-riksarkivet.github.io/htrflow"
Repository = "https://github.com/AI-Riksarkivet/htrflow"
[project.scripts]
htrflow = "htrflow.cli:app"
[dependency-groups]
dev = [
"pytest >=8.0.1",
"pytest-cov >=4.1.0",
"pytest-github-actions-annotate-failures >=0.2.0",
"python-dotenv >=1.0.1",
"ruff >=0.6.2",
"uv>=0.4.12",
"tox-uv>=1.13.0",
]
[project.optional-dependencies]
docs = [
"mike >=2.1.1",
"mkdocs-jupyter >=0.24.6",
"mkdocs-material >=9.5.10",
"mkdocstrings[python] >=0.20",
"mkdocs-table-reader-plugin >=2.2.2",
"mkdocs-git-revision-date-localized-plugin >=1.2.6",
"termynal >=0.12.1",
"mkdocs-swagger-ui-tag >=0.6.10"
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/htrflow"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.pytest.ini_options]
addopts = "-v --cov htrflow --cov-report term-missing --no-cov-on-fail"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"gpu: marks tests as gpu (deselect with '-m \"not gpu\"')",
"teklia: marks tests as teklia (deselect with '-m \"not teklia\"')"
]
pythonpath = "src"
testpaths = ["tests/unit", "tests/integration"]
[tool.coverage.run]
source = ["src/htrflow"]
[tool.coverage.report]
exclude_lines = [
"if __name__ == .__main__.:",
"pragma: no cover",
"def __repr__",
"if self\\.debug",
"raise AssertionError",
"raise NotImplementedError",
]
# Formatting and linting (tool.ruff)
[tool.ruff]
line-length = 119
target-version = "py310"
exclude = ["*.ipynb"]
[tool.ruff.lint]
ignore = ["C901", "E741", "W605"]
select = ["C", "E", "F", "I", "W"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403", "F811"]
# Disable line length limit in cli.py. This allows Typer CLI arguments
# and their documentation to use one line each, increasing readability.
"cli.py" = ["E501"]
[tool.ruff.lint.isort]
known-first-party = ["htrflow"]
lines-after-imports = 2