-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
147 lines (128 loc) · 3.19 KB
/
pyproject.toml
File metadata and controls
147 lines (128 loc) · 3.19 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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "archive-manager-python"
version = "0.1.0"
description = "Contacts manager CLI with SQLite storage and Rich UI"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.11"
dependencies = [
# UI
"rich>=13.7.0",
"InquirerPy>=0.3.4",
"decorator>=5.1.1",
# API
"fastapi>=0.109.0",
"uvicorn>=0.27.0",
# Database
"SQLAlchemy>=2.0.0",
# Configuration
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"PyYAML>=6.0.0",
]
[project.optional-dependencies]
dev = [
# Testing
"pytest>=8.0.0",
"pytest-cov>=4.0.0",
"httpx>=0.27.0",
# Linting and formatting
"ruff>=0.6.0",
"mypy>=1.10.0",
# Pre-commit hooks
"pre-commit>=3.7.0",
# Type stubs
"types-PyYAML>=6.0.0",
]
[project.scripts]
archive-manager = "archive_manager:main"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
"archive_manager" = [
"resources/**/*.json",
"infrastructure/persistence/db/scripts/*.sql",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--verbose",
"--strict-markers",
"--tb=short",
"--color=yes",
]
markers = [
"unit: Unit tests for isolated components",
"integration: Integration tests across layers",
"slow: Tests that take significant time to run",
]
[tool.coverage.run]
source = ["src"]
branch = true
omit = ["*/tests/*", "*/__pycache__/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]
[tool.ruff]
target-version = "py311"
line-length = 88
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
[tool.ruff.lint]
select = [
"E", "F", "W", "I", "N", "UP", "B", "C4", "SIM",
"RUF",
"TRY", "RET", "RSE", "ERA",
"DTZ",
"PERF", "PTH", "FURB",
"S",
"D",
]
ignore = ["E203", "E501"]
[tool.ruff.lint.per-file-ignores]
# S101: assert is used intentionally in tests
"tests/**/*.py" = ["S101", "S104"]
# N818: Exception names are intentionally named for semantics
"src/archive_manager/core/errors.py" = ["N818"]
# S605: Shell command is safe (only cls/clear)
"src/archive_manager/adapters/cli/ui/csl_ui.py" = ["S605"]
# TRY301: Abstract raise is common pattern in repository layer
"src/archive_manager/infrastructure/persistence/sqlite_contact_repository.py" = ["TRY301"]
# B008: FastAPI Depends in default args is expected
"src/archive_manager/adapters/api/**/*.py" = ["B008"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
ignore_missing_imports = true
exclude = ["^tests/"]
[[tool.mypy.overrides]]
module = "decorator"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = false
[[tool.mypy.overrides]]
module = "yaml"
ignore_missing_imports = true
[tool.markdownlint]
MD033 = false