aboutsummaryrefslogtreecommitdiffstats
path: root/pyproject.toml
blob: ac69e848e02a67ce2bee79b5774b6dabf6030267 (plain) (blame)
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
[project]
name = "site"
version = "1.0.0"
description = "The project responsible for maintaining our website and all of its subdomains."
authors = [{ name = "Python Discord", email = "[email protected]" }]
requires-python = "==3.11.*"
license = "MIT"
dependencies = [
    "django==5.1.9",
    "django-distill==3.2.7",
    "django-environ==0.11.2",
    "django-filter==25.1",
    "django-prometheus==2.3.1",
    "django-simple-bulma==2.6.0",
    "djangorestframework==3.16.0",
    "gunicorn==23.0.0",
    "httpx==0.28.1",
    "markdown==3.8",
    "psycopg[binary]==3.2.6",
    "pyjwt[crypto]==2.10.1",
    "pymdown-extensions==10.14.3",
    "python-frontmatter==1.1.0",
    "pyyaml==6.0.2",
    "sentry-sdk==2.22.0",
    "whitenoise==6.9.0",
]

[dependency-groups]
dev = [
    "python-dotenv==1.1.0",
    "taskipy==1.14.1",
    "ruff==0.9.10",
]
lint = ["pre-commit==4.2.0"]
test = ["coverage==7.8.0"]

[tool.uv]
package = false
default-groups = [
    "dev",
    "lint",
    "test",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.ruff]
target-version = "py311"
extend-exclude = [".cache"]
line-length = 120
output-format = "concise"
unsafe-fixes = true

[tool.ruff.lint]
ignore = [
    "ANN002", "ANN003", "ANN204", "ANN206", "ANN401",
    "B904",
    "C401", "C408",
    "D100", "D104", "D105", "D107", "D203", "D212", "D214", "D215", "D301",
    "D400", "D401", "D402", "D404", "D405", "D406", "D407", "D408", "D409", "D410", "D411", "D412", "D413", "D414", "D416", "D417",
    "E731",
    "DJ001", "DJ008",
    "RET504",
    "RUF005", "RUF012",
    "S101", "S311",
    "SIM102", "SIM108",
]
select = ["ANN", "B", "C4", "D", "DJ", "DTZ", "E", "F", "ISC", "INT", "N", "PGH", "PIE", "RET", "RSE", "RUF", "S", "SIM", "T20", "TID", "UP", "W"]

[tool.ruff.lint.per-file-ignores]
"pydis_site/apps/**/migrations/*.py" = ["ALL"]
"manage.py" = ["T201"]
"pydis_site/apps/api/tests/base.py" = ["S106"]
"pydis_site/apps/**/tests/test_*.py" = ["ANN", "D"]
"static-builds/netlify_build.py" = ["T201"]
"pydis_site/apps/api/tests/test_off_topic_channel_names.py" = ["RUF001"]
"gunicorn.conf.py" = ["ANN", "D"]
"pydis_site/apps/api/models/bot/off_topic_channel_name.py" = ["RUF001"]

[tool.taskipy.tasks]
start = "python manage.py run"
makemigrations = "python manage.py makemigrations"
django_shell = "python manage.py shell"
test = "coverage run manage.py test"
coverage = "coverage run manage.py test --no-input && coverage report -m"
report = "coverage report -m"
lint = "pre-commit run --all-files"
precommit = "pre-commit install"
static = "python manage.py distill-local build --traceback --force"