-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
87 lines (75 loc) · 3.35 KB
/
Copy pathpyproject.toml
File metadata and controls
87 lines (75 loc) · 3.35 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
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "pdf2conta"
version = "0.1.0"
description = "Self-hosted OCR stack that converts Italian bank statements and paper invoices into Ago Zucchetti CSV files."
readme = "README.md"
requires-python = ">=3.12"
license = { text = "MIT" }
authors = [{ name = "Riccardo Bettoni" }]
keywords = ["ocr", "vllm", "dots.ocr", "bank-statement", "invoice", "accounting", "self-hosted"]
# Runtime dependencies are intentionally NOT declared here: each Docker service
# pins its own set in its own requirements.txt (the build context only copies
# that service's folder). This section covers only the developer tooling used
# to lint, type-check and test the repository from the host.
[project.optional-dependencies]
dev = [
"ruff==0.15.19", # pinned: formatting/lint output is version-sensitive (keeps CI stable)
"mypy>=2.1.0",
"pytest>=9.1.1",
"pytest-cov>=7.1.0",
"beautifulsoup4==4.15.0", # needed to import ec_converter.templates during test collection
]
[project.urls]
Repository = "https://github.com/bertorico/pdf2conta"
# ---------------------------------------------------------------------------
# Tooling configuration
# ---------------------------------------------------------------------------
[tool.setuptools]
# This repo is a collection of independent Docker services, not an installable
# library. `pip install -e .[dev]` exists only to pull the dev tooling above;
# there is no importable top-level package to discover.
py-modules = []
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
# Conservative starting set; broaden (B, SIM, ...) as the codebase is hardened.
select = ["E", "F", "I", "UP"]
# Line length is enforced by the formatter; E501 only fires on un-wrappable
# string literals (prompts, markdown), so we let the formatter own width.
ignore = ["E501"]
[tool.ruff.lint.isort]
known-first-party = ["normalizer", "templates", "pipeline", "csv_exporter", "fattura"]
[tool.mypy]
python_version = "3.12"
# Bare intra-folder imports (e.g. `from normalizer import ...`) resolve via these.
mypy_path = ["ec_converter", "fatture_converter"]
ignore_missing_imports = true
# Scoped to the stdlib-clean, well-typed modules for now; widen incrementally.
files = ["ec_converter/normalizer.py", "fatture_converter/fattura.py"]
[tool.pytest.ini_options]
testpaths = ["tests"]
# The code uses flat intra-folder imports, so expose those folders as roots.
# "." is also needed so `fatture_converter` is importable as a package (its
# own modules use absolute imports like `from fatture_converter.fattura import ...`).
pythonpath = [".", "ec_converter", "fatture_converter"]
addopts = "-q"
[tool.coverage.run]
# Only the testable modules are measured: the Gradio UIs and the CLI/batch
# entry-points (app.py, pipeline.py, process_fatture.py) need a live GPU /
# vLLM / Gradio runtime and are exercised manually, not in unit tests.
source = ["ec_converter", "fatture_converter"]
omit = [
"ec_converter/app.py",
"ec_converter/pipeline.py",
"fatture_converter/process_fatture.py",
]
[tool.coverage.report]
# Floor below which CI fails. Kept intentionally conservative: the testable
# modules (normalizer, templates, fattura, csv exporters) are well covered,
# but new code landing in the measured set shouldn't silently drop coverage.
fail_under = 75
show_missing = true