File size: 1,812 Bytes
44c2f50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6267e20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44c2f50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
[project]
name = "structured-data-extraction"
version = "0.1.0"
description = "Multi-domain document extraction service: invoices, receipts, and SEC filings to schema-validated JSON."
authors = [{ name = "ASP", email = "adityapatel1801@gmail.com" }]
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }

[tool.ruff]
line-length = 100
target-version = "py311"

[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP", "B", "SIM"]
ignore = ["E501", "UP017"]  # E501: line-length via formatter. UP017: datetime.UTC (3.11-only) — we still support timezone.utc for broader interpreter reach in tooling.

[tool.ruff.lint.per-file-ignores]
# HTTP-error taxonomy — these are our own class hierarchy, not surprises.
# Renaming to `*Error` would leak "Error" everywhere at call sites without
# adding meaning.
"src/api/errors.py" = ["N818"]
# FastAPI convention: File(...) / Depends() go in function default args.
# The whole framework is built around this pattern.
"src/api/routers/*.py" = ["B008"]
# Parser branches carry different explanatory comments — a ternary would
# drop them and hurt readability more than help.
"src/data_prep/parsers.py" = ["SIM108"]
# Test tuple-unpacking sometimes leaves parts unused for clarity.
"tests/**/*.py" = ["B007"]

[tool.black]
line-length = 100
target-version = ["py311"]

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = "-v"
# Coverage: run `pytest --cov=src --cov-report=term-missing --cov-report=html` locally.
# Kept out of default addopts because coverage's temp-file cleanup fails on some
# network/mounted filesystems (works fine on native Windows/Linux).
asyncio_mode = "auto"

[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*", "*/__init__.py"]