-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
110 lines (101 loc) · 2.36 KB
/
pyproject.toml
File metadata and controls
110 lines (101 loc) · 2.36 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
[project]
name = "django5-boiler"
version = "0.0.1"
requires-python = ">=3.13"
dependencies = [
"Werkzeug",
"celery>=5,<6",
"channels-redis<5",
"channels[daphne]<5",
"django>=5,<6",
"django-celery-beat<3",
"django-cors-headers<5",
"django-debug-toolbar<6",
"django-extensions>=4,<5",
"django-redis>=5,<6",
"gunicorn",
"httpx",
"mysqlclient",
# "psycopg[binary]",
"python-decouple",
"sentry-sdk",
"uvicorn[standard]",
]
[dependency-groups]
dev = [
"bandit",
"black",
"coverage",
"isort",
"mypy",
"ruff",
"tombi",
"toml-run",
"ty",
"types-requests",
"yamllint",
]
# Bandit
# https://bandit.readthedocs.io/en/latest/config.html
[tool.bandit]
exclude_dirs = [".venv"]
# Black
# https://black.readthedocs.io/en/stable/usage_and_configuration/
[tool.black]
line-length = 119
extend-exclude = '(migrations|templates|\.github)'
# Coverage
# https://coverage.readthedocs.io/en/latest/
[tool.coverage.run]
omit = [".venv/*", "migrations/*", "node_modules/*"]
# Isort
# https://pycqa.github.io/isort/docs/configuration/options.html
[tool.isort]
profile = "black"
lines_after_imports = 2
src_paths = ["app"]
skip = [".venv", "migrations", "node_modules", ".github"]
# Mypy
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
ignore_missing_imports = true
exclude = [".venv", "migrations", "node_modules"]
# Ruff
# https://docs.astral.sh/ruff/configuration/
[tool.ruff]
line-length = 119
target-version = "py312"
extend-exclude = ["migrations", ".github"]
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "B", "Q"]
# Scripts
# https://github.com/cssnr/toml-run
[tool.scripts]
test = [
"uv run coverage run --rcfile=pyproject.toml app/manage.py test --verbosity 2 --keepdb",
"uv run coverage xml",
"uv run coverage report -m",
]
format = [
"uv run black app",
"uv run isort -c app",
"uv run ruff format",
"uv run tombi format",
"which prettier && prettier --write . || echo missing prettier",
]
lint = [
"run bandit",
# "run mypy",
"run ruff",
"run yamllint",
"uv run black --check app",
"uv run isort -c app",
"uv run tombi lint",
# "uv run ty check -v app",
"uv lock --check",
"which prettier && prettier --check . || echo missing prettier",
]
bandit = "uv run bandit -c pyproject.toml -r app"
mypy = "uv run mypy app"
ruff = "uv run ruff check app"
yamllint = "uv run yamllint -c .github/yamllint.yaml ."