-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
179 lines (170 loc) · 3.55 KB
/
pyproject.toml
File metadata and controls
179 lines (170 loc) · 3.55 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
[project]
name = "datagovuk"
version = "0.1.0"
description = "data.gov.uk website."
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "Brendan Smith", email = "brendan.smith@cabinet-office.digital.gov.uk" },
]
requires-python = "==3.14.*"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"argon2-cffi==25.1.0",
"chartkick==1.1.0",
"django==6.0.4",
"django-compressor==4.6.0",
"django-environ==0.13.0",
"django-health-check==4.3.0",
"django-libsass==0.9",
"gunicorn==25.3.0",
"jinja2==3.1.6",
"mistune==3.2.0",
"pillow==12.2.0",
"python-frontmatter==1.1.0",
"python-slugify==8.0.4",
"sentry-sdk==2.58.0",
"whitenoise==6.12.0",
]
[dependency-groups]
dev = [
"coverage==7.13.5",
"django-coverage-plugin==3.2.2",
"django-debug-toolbar==6.3.0",
"django-extensions==4.1",
"django-stubs[compatible-mypy]==6.0.2",
"djlint==1.36.4",
"factory-boy==3.3.3",
"ipdb==0.13.13",
"mypy==1.20.1",
"playwright>=1.58.0",
"pre-commit==4.5.1",
"pytest==9.0.3",
"pytest-django==4.12.0",
"pytest-lazy-fixtures==1.4.0",
"pytest-playwright==0.7.2",
"pytest-sugar==1.1.1",
"ruff==0.15.11",
"werkzeug[watchdog]==3.1.8",
]
[tool.uv]
add-bounds = "exact"
[tool.ruff]
line-length = 120
# Exclude a variety of commonly ignored directories.
extend-exclude = [
"*/migrations/*.py",
"staticfiles/*",
]
lint.select = [
"A",
"ASYNC",
"B",
"BLE",
"C4",
"C90",
"COM",
"DJ",
"DTZ",
"E",
"EM",
"ERA",
"EXE",
"F",
"FA",
"FBT",
"FLY",
"G",
"I",
"ICN",
"INP",
"INT",
"ISC",
"N",
"PD",
"PERF",
"PGH",
"PIE",
"PL",
"PT",
"PTH",
"PYI",
"Q",
"RET",
"RSE",
"RUF",
"S",
"SIM",
"SLF",
"SLOT",
"T10",
"T20",
"TC",
"TID",
"TRY",
"UP",
"W",
"YTT",
]
lint.ignore = [
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
"SIM102", # sometimes it's better to nest
# of types for comparison.
# Deactivated because it can make the code slow:
# https://github.com/astral-sh/ruff/issues/7871
]
lint.isort.combine-as-imports = true
lint.isort.force-single-line = false
[tool.pyproject-fmt]
keep_full_version = true
# ==== mypy ====
[tool.mypy]
python_version = "3.14"
check_untyped_defs = true
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
plugins = [
"mypy_django_plugin.main",
]
overrides = [
# Django migrations should not produce any errors:
{ module = "*.migrations.*", ignore_errors = true },
]
[tool.django-stubs]
django_settings_module = "config.settings.test"
[tool.pytest]
# ==== pytest ====
ini_options.minversion = "6.0"
ini_options.addopts = "--ds=config.settings.test --reuse-db --import-mode=importlib"
ini_options.python_files = [
"tests.py",
"test_*.py",
]
[tool.coverage]
# ==== Coverage ====
run.include = [ "datagovuk/**" ]
run.omit = [ "*/conftest.py", "*/migrations/*", "*/tests/*" ]
run.plugins = [ "django_coverage_plugin" ]
# ==== djLint ====
[tool.djlint]
blank_line_after_tag = "load,extends"
close_void_tags = true
format_css = false
format_js = false
preserve_blank_lines = true
# TODO: remove T002 when fixed https://github.com/djlint/djLint/issues/687
# TODO: Remove J004, J018 when links fully moved over to this repo
ignore = "H006,H030,H031,T002,J004,J018"
include = "H017,H035"
indent = 2
profile = "jinja"
css.indent_size = 2
js.indent_size = 2
max_line_length = 120
max_attribute_length = 120