-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
125 lines (98 loc) · 2.75 KB
/
pyproject.toml
File metadata and controls
125 lines (98 loc) · 2.75 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
[project]
name = "pythonsd-django"
version = "0.3.0"
description = "San Diego Python website - sandiegopython.org"
requires-python = ">=3.14, <3.15"
dependencies = [
# This is a Django app
"Django >= 5.2, < 5.3",
# A zero dependency WSGI server
"gunicorn",
# For connecting to various APIs (eg. Meetup.com, YouTube)
"requests",
# For serving static assets from the WSGI server
"whitenoise",
# Redirects requests to other hosts to this one
"django-enforce-host",
# For parsing YouTube's XML feed
# DefusedXML is necessary to parse untrusted XML safely
"defusedxml",
# Used for image field handling
"pillow",
"dj-database-url",
]
[project.optional-dependencies]
# Development dependencies
dev = [
# Used for code formatting and linting
"pre-commit",
# Used for code coverage
"coverage",
"django_coverage_plugin",
# Used in local testing
"WebTest",
"beautifulsoup4",
"WebOb==1.8.9",
"responses",
# Used to help with Django related debugging
"django-debug-toolbar",
]
# Production dependencies
production = [
# Database server
# https://www.psycopg.org/docs/install.html#install-from-source
"psycopg[binary]",
# Email
"django-anymail",
# Cloud storage for media storage (S3, R2, etc.)
"django-storages[s3]",
]
# https://docs.astral.sh/ruff/configuration/
[tool.ruff]
exclude = [
"manage.py",
"docs",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.14
target-version = "py314"
[tool.ruff.lint]
# Enable:
# Pyflakes (`F`)
# pycodestyle (`E`) error codes.
# isort (`I`) import sorting
select = ["E4", "E7", "E9", "F", "I"]
[tool.ruff.lint.isort]
# https://docs.astral.sh/ruff/settings/#lintisort
force-single-line = true
case-sensitive = false
lines-after-imports = 2
# Ignore `F405` (import *) in config files
[tool.ruff.lint.per-file-ignores]
"config/settings/*" = ["F405"]
# Run all tests with `tox`
[tool.tox]
# https://tox.wiki/en/latest/config.html#pyproject-toml-native
env_list = ["coverage", "styles", "migrations"]
[tool.tox.env_run_base]
description = "Run the full test suite under {base_python}"
runner = "uv-venv-lock-runner"
base_python = ["python3.14"]
extras = [
"dev",
]
[tool.tox.env.coverage]
description = "Run full unit test suite with coverage"
commands = [
["uv", "run", "coverage", "run", "manage.py", "test", "-v2", "--settings", "config.settings.test"],
["uv", "run", "coverage", "html"],
["uv", "run", "coverage", "report", "--show-missing", "--fail-under=100"],
]
[tool.tox.env.styles]
description = "Run type check on code base"
commands = [["uv", "run", "pre-commit", "run", "--all-files"]]
[tool.tox.env.migrations]
description = "Check for missing migrations"
commands = [["uv", "run", "python", "manage.py", "makemigrations", "--check", "--dry-run"]]