-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
109 lines (100 loc) · 2.87 KB
/
pyproject.toml
File metadata and controls
109 lines (100 loc) · 2.87 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
[project]
name = "address-validator"
version = "0.1.0"
description = "USPS address parsing and standardization service"
requires-python = ">=3.12"
dependencies = [
"fastapi>=0.129,<1",
"uvicorn>=0.41,<1",
"usaddress>=0.5.16,<1",
"pydantic>=2.12,<3",
"pydantic-settings>=2.9,<3",
"pycountry>=26.2.16,<27",
"httpx>=0.28,<1",
"python-ulid>=3.1,<4",
"sqlalchemy[asyncio]>=2.0,<3",
"asyncpg>=0.30,<1",
"alembic>=1.14,<2",
"google-cloud-quotas>=0.5,<1",
"google-cloud-monitoring>=2.0,<3",
"google-cloud-storage>=3.1,<4",
"google-auth>=2.0,<3",
"pyarrow>=19.0,<20",
"jinja2>=3.1.6",
"google-i18n-address>=3.1.1,<4",
"python-multipart>=0.0.26,<1",
]
[dependency-groups]
dev = [
"httpx>=0.28.1,<1",
"parserator>=0.6.9",
"pre-commit>=4.5.1",
"pytest>=9.0.2",
"pytest-asyncio>=1.3.0,<2",
"pytest-cov>=7.0.0",
"ruff>=0.15.4",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
pythonpath = ["src", "scripts", "infra"]
addopts = "--cov=src/address_validator --cov-report=term-missing --cov-fail-under=80"
markers = [
"integration: full HTTP stack tests (require app lifespan)",
"unit: isolated unit tests",
]
[tool.coverage.run]
source = ["src/address_validator"]
omit = [
"src/address_validator/usps_data/__init__.py",
"src/address_validator/services/__init__.py",
"src/address_validator/routers/__init__.py",
"src/address_validator/routers/v1/__init__.py",
"src/address_validator/middleware/__init__.py",
]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@overload",
]
[tool.ruff]
line-length = 100
target-version = "py312"
exclude = [".venv", "skills-vendor"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"S", # flake8-bandit (security)
"SIM", # flake8-simplify
"ANN", # flake8-annotations
"RUF", # ruff-native rules
"PL", # pylint
"SLF", # flake8-self (private member access)
"PTH", # flake8-use-pathlib
"TCH", # flake8-type-checking
]
ignore = [
"ANN401", # Dynamically typed expressions (Any) allowed where needed
"S101", # Use of assert (needed in tests)
"PLR0913", # Too many arguments — acceptable in FastAPI handlers
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"ANN", # No annotation requirements in tests
"S", # Security rules relaxed in tests
"PLR2004", # Magic value comparisons are expected in assertions
"SLF001", # Private member access is intentional in tests
]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["fastapi.Depends"]
[tool.ruff.lint.isort]
known-first-party = ["address_validator"]