-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (124 loc) · 3.03 KB
/
pyproject.toml
File metadata and controls
138 lines (124 loc) · 3.03 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
py-modules = []
[project]
name = "fastapi-htmx-starter"
version = "0.1.0"
description = "A modern FastAPI + HTMX starter template with authentication and SQLAlchemy."
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
authors = [
{name = "Your Name", email = "your.email@example.com"},
]
dependencies = [
"fastapi>=0.115.12",
"uvicorn>=0.34.2",
"jinja2>=3.1.6",
"python-multipart>=0.0.6",
"python-dotenv>=1.0.0",
"sqlalchemy>=2.0.0",
"alembic>=1.13.1",
"pydantic-settings>=2.2.1",
"aiosqlite>=0.18.0",
"fastapi-users[sqlalchemy]>=13.0.0",
"email-validator>=2.1.1",
]
[project.scripts]
serve = "app.cli:serve_command"
test = "app.cli:test_command"
lint = "app.cli:lint_command"
format = "app.cli:format_command"
check-types = "app.cli:check_types_command"
[tool.uv]
dev-dependencies = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.1",
"pytest-cov>=4.1.0",
"httpx>=0.24.1",
"black>=23.7.0",
"isort>=5.12.0",
"mypy>=1.5.1",
"flake8>=6.1.0",
"pre-commit>=3.4.0",
"ruff>=0.0.290",
"watchfiles>=0.21.0",
"djlint>=1.36.4"
]
[tool.black]
line-length = 88
target-version = ["py312"]
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.venv
| build
| dist
)/
'''
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_incomplete_defs = true
[tool.pytest.ini_options]
testpaths = ["app/tests"]
python_files = "test_*.py"
python_functions = "test_*"
asyncio_mode = "auto"
addopts = "-v --cov=app --cov-report=term-missing"
[tool.ruff]
line-length = 88
target-version = "py312"
isort.known-first-party = ["app"]
select = [
"E", "F", "W", # Default flake8
"I", # isort
"S", # flake8-bandit security
"COM", # flake8-commas
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"PTH", # flake8-use-pathlib
]
ignore = [
"B008", # flake8-bugbear
"D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107", # Missing docstrings
"ANN001", "ANN002", "ANN003", "ANN201", "ANN202", "ANN204", "ANN205", "ANN206", # Missing type annotations
]
[tool.flake8]
max-line-length = 88
max-comment-length = 120
[tool.ruff.per-file-ignores]
"app/tests/*" = ["S101"]
"app/cli.py" = ["S"]
[tool.ruff.flake8-bugbear]
extend-immutable-calls = ["fastapi.Depends", "fastapi.params.Depends", "fastapi.Query", "fastapi.params.Query", "fastapi_users.current_user"]
[tool.coverage.run]
source = ["app"]
omit = ["app/tests/*"]
branch = true
parallel = true
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.djlint]
profile = "jinja"
indent = 2
max_line_length = 100
max_attribute_length = 100
format_attribute_template_tags = true
format_css = true
format_js = true
close_void_tags = true
line_break_after_multiline_tag = false
max_blank_lines = 2