Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
115 lines (110 loc) · 1.99 KB
/
Copy pathpyproject.toml
File metadata and controls
115 lines (110 loc) · 1.99 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
[project]
name = "governance"
version = "0.0.1"
license = "BSD-3-Clause"
requires-python = ">=3.15"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.15",
]
dependencies = [
"coverage[toml]>=7.13.3",
"django>=6.0.5",
"django-authlib>=0.17.2",
"django-canonical-domain>=0.11",
"django-debug-toolbar>=6.2",
"django-ninja>=1.7.2",
"granian>=2.7",
"markdown-it-py[linkify]>=4.2",
"psycopg[binary]>=3.3.2",
"sentry-sdk<3",
"speckenv>=6.5",
"time-machine>=3.2",
]
[dependency-groups]
# The CLI tests run the CLI, the deployment doesn't need it (UV_NO_DEV)
dev = [
"governance-cli",
"playwright>=1.64.1",
"tblib>=3.2.2",
]
[tool.uv]
sources.governance-cli = { path = "cli", editable = true }
[tool.ruff]
target-version = "py315"
preview = true
fix = true
show-fixes = true
lint.extend-select = [
"ASYNC",
"B",
"C4",
"C90",
"DJ",
"E",
"F",
"FBT",
"I",
"INP",
"INT",
"ISC",
"LOG",
"PGH",
"PIE",
"PLC",
"PLE",
"PLW",
"RET",
"RUF005",
"RUF006",
"RUF007",
"RUF008",
"RUF009",
"RUF010",
"RUF015",
"RUF016",
"RUF017",
"RUF100",
"RUF200",
"SLOT",
"TID",
"UP",
"W",
"YTT",
]
lint.extend-ignore = [
# Allow zip() without strict=
"B905",
# No line length errors
"E501",
# Deferred imports for circular import avoidance are a common Django pattern
"PLC0415",
# Mutable class attributes are fine
"RUF012",
]
lint.per-file-ignores."*/migrat*/*" = [
"N806",
"N999",
]
lint.per-file-ignores."scripts/*" = [
"INP",
]
lint.isort.combine-as-imports = true
lint.isort.lines-after-imports = 2
lint.mccabe.max-complexity = 15
[tool.coverage]
run.omit = [
"*migrate*",
"*migrations*",
"*venv*",
]
run.branch = true
# Parallel test runs (./runtests.sh): a file per process, combined after
run.concurrency = [ "multiprocessing", "thread" ]
run.parallel = true
run.sigterm = true
report.skip_covered = true
report.show_missing = true
[tool.djangofmt]
indent-width = 2
profile = "django"