Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
56 lines (50 loc) · 2.11 KB
/
Copy pathpyproject.toml
File metadata and controls
56 lines (50 loc) · 2.11 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
# Tool and dependency configuration. This is not a distributable package:
# the generator runs in place, out of a checkout, with `python -m website.build`.
#
# Each runnable concern declares the smallest dependency group it needs. The
# development group includes those runtime groups so CI exercises the same
# imports as a checkout build.
[dependency-groups]
site = ["jinja2>=3.1"]
# Sidecar projection and release verification both validate against published
# JSON Schemas instead of restating their structures in Python.
contracts = ["jsonschema>=4"]
fonts = ["fonttools>=4.50", "brotli>=1.1"]
# What a full `pytest` and lint run needs. CI fails on a skipped test, so every
# runtime needed by a test is included instead of being silently optional.
dev = [
"pytest>=7",
"ruff>=0.5",
"pyright>=1.1",
"beautifulsoup4>=4.12",
{include-group = "site"},
{include-group = "contracts"},
{include-group = "fonts"},
]
# scripts/make_og_image.py drives a headless Chrome to redraw the sharing
# card. Nothing else uses it, no test covers it, and its output is committed,
# so it is asked for only by someone rerunning that script.
og = ["websocket-client>=1.7", {include-group = "site"}]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
[tool.ruff]
line-length = 100
target-version = "py314"
extend-exclude = ["fonts"]
# Layout is the formatter's, so it is not argued about in review or hand-kept
# per file. `ruff format --check` runs in CI, which is what makes that true
# rather than merely intended.
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
# "I" is here because the formatter does not order imports and nothing else
# would; the rest are about what the code does rather than how it is laid out.
select = ["E", "F", "W", "I", "B", "SIM", "C4", "UP", "RET", "ARG", "PIE", "RUF"]
# The en dash is typography, not a mistyped hyphen: it is what a numeric range
# takes, and these labels are rendered text. Em dashes remain banned, by a test.
allowed-confusables = ["–", "≤", "≥", "×"]
[tool.pyright]
include = ["website", "scripts"]
exclude = ["**/__pycache__"]
pythonVersion = "3.14"