-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (115 loc) · 3.15 KB
/
pyproject.toml
File metadata and controls
133 lines (115 loc) · 3.15 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "personal-todo"
version = "0.1.0"
description = "CLI-first, AI-native personal task manager with RAG-powered search"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [
{ name = "User", email = "user@example.com" }
]
dependencies = [
"sqlalchemy[asyncio]>=2.0.23",
"aiosqlite>=0.19.0",
"alembic>=1.13.0",
"typer>=0.9.0",
"rich>=13.7.0",
"pydantic>=2.5.0",
"pydantic-settings>=2.1.0",
]
[project.optional-dependencies]
# Development dependencies (includes FastAPI for backend and tests)
dev = [
"pytest>=7.4.3",
"pytest-asyncio>=0.21.1",
"pytest-cov>=5.0.0",
"pytest-xdist>=3.5.0", # Parallel test execution
"ruff>=0.1.8",
"mypy>=1.7.1",
"pre-commit>=3.5.0",
"ipython>=8.12.0",
# FastAPI dependencies (required for backend/main.py and tests)
"fastapi>=0.104.0",
"uvicorn[standard]>=0.24.0",
"python-multipart>=0.0.6",
"jinja2>=3.1.2",
"httpx>=0.25.0", # Required for FastAPI TestClient
]
# Install all optional dependencies
all = [
"personal-todo[dev]",
]
[project.scripts]
tgenie = "backend.cli.main:app"
[tool.hatchling.scripts]
# No custom build scripts needed
[tool.hatch.build.targets.wheel]
packages = ["backend"]
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
# Rule selection: all rules are explicitly listed in select.
# extend-select is additive (adds to select), but since we explicitly set select,
# we consolidate everything here for clarity.
select = [
"E", # pycodestyle errors (includes E402: module-import-not-at-top-of-file)
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"W", # pycodestyle warnings
"UP", # pyupgrade
"C90", # McCabe complexity
"PLR", # Pylint refactor
"D100", # pydocstyle: undocumented-public-module - Requires module docstrings
"PLC0415", # pylint: import-outside-top-level - Enforces imports at module top-level
]
ignore = [
"E501", # Line too long
"B008", # Do not perform function calls in argument defaults
]
unfixable = ["F841"]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.pylint]
max-args = 10
max-branches = 15
max-returns = 8
max-statements = 60
[tool.ruff.lint.isort]
known-first-party = ["backend"]
known-third-party = ["fastapi", "pydantic", "sqlalchemy", "typer"]
split-on-trailing-comma = false
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
indent-style = "space"
skip-magic-trailing-comma = true
quote-style = "double"
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_ignores = false
disallow_untyped_defs = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
addopts = "-v --tb=short"
[tool.coverage.run]
branch = true
source = ["backend"]
omit = ["tests/*"]
[tool.coverage.report]
show_missing = true
skip_covered = true