-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
362 lines (336 loc) · 9.35 KB
/
pyproject.toml
File metadata and controls
362 lines (336 loc) · 9.35 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
[build-system]
build-backend = "uv_build"
requires = ["uv_build>=0.9.11,<0.11.0"]
[dependency-groups]
docs = [
"linkify-it-py>=2.0.0",
"myst-parser>=2.0.0",
"shibuya>=2024.8.0",
"sphinx>=7.0.0",
"sphinx-autobuild>=2024.0.0",
"sphinx-autodoc-typehints>=2.0.0",
"sphinx-copybutton>=0.5.0",
"sphinx-design>=0.5.0",
]
lint = ["codespell>=2.2.6", "prek>=0.2.18", "ruff>=0.8.0", "ty>=0.0.1a27"]
test = [
"model-bakery>=1.20.0",
"pytest>=8.1.1",
"pytest-cov>=4.1.0",
"pytest-django>=4.9.0",
"pytest-sugar>=1.1.1",
"pytest-xdist>=3.8.0",
]
dev = [
{ include-group = "docs" },
{ include-group = "lint" },
{ include-group = "test" },
"python-dotenv>=1.2.1",
]
[project]
authors = [{ name = "Jacob Coffee", email = "jacob@python.org" }]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 5.2",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"django>=5.2",
"django-fernet-encrypted-fields>=0.3.1",
"httpx>=0.28.1",
"pillow>=12.1.1",
"pretalx-client>=0.1.0",
"qrcode[pil]>=8.2",
"reportlab>=4.4.10",
"stripe>=12.0.0",
]
description = "Modern conference management plugin for Django"
keywords = [
"django",
"conference",
"registration",
"program",
"schedule",
"tickets",
]
license = { text = "MIT" }
name = "django-program"
readme = "README.md"
requires-python = ">=3.14"
version = "0.1.0"
[project.urls]
Changelog = "https://github.com/JacobCoffee/django-program/releases/"
Documentation = "https://jacobcoffee.github.io/django-program"
"Issue Tracker" = "https://github.com/JacobCoffee/django-program/issues"
Repository = "https://github.com/JacobCoffee/django-program"
[tool.codespell]
skip = "uv.lock"
ignore-words-list = "checkin"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"\\.\\.\\.",
"@abstractmethod",
"class .*(Protocol):",
]
fail_under = 100
[tool.coverage.run]
concurrency = ["multiprocessing", "thread"]
omit = ["*/tests/*"]
parallel = true
source = ["django_program"]
[tool.git-cliff.changelog]
header = """
# Changelog
All notable changes to this project will be documented in this file.
"""
body = """
{% if version %}\
{% if previous.version %}\
## [{{ version | trim_start_matches(pat="v") }}]($REPO/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif %}\
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits
| filter(attribute="scope")
| sort(attribute="scope") %}
- **({{commit.scope}})**{% if commit.breaking %} [**breaking**]{% endif %} {{ commit.message }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }}
{%- endfor -%}
{%- for commit in commits %}
{%- if commit.scope -%}
{% else %}
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }}
{% endif -%}
{% endfor -%}
{% endfor %}
"""
footer = """
---
*django-program Changelog*
"""
output = "docs/changelog.md"
postprocessors = [
{ pattern = '\$REPO', replace = "https://github.com/JacobCoffee/django-program" },
]
trim = true
[tool.git-cliff.git]
commit_parsers = [
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^doc", group = "Documentation" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactoring" },
{ message = "^style", group = "Style" },
{ message = "^revert", group = "Revert" },
{ message = "^test", group = "Tests" },
{ message = "^chore\\(version\\):", skip = true },
{ message = "^chore", group = "Miscellaneous Chores" },
{ body = ".*security", group = "Security" },
]
conventional_commits = true
filter_unconventional = true
sort_commits = "oldest"
tag_pattern = "v[0-9].*"
[tool.pytest.ini_options]
addopts = [
"--strict-markers",
"--tb=short",
"-n", "auto",
"-p", "no:pastebin",
"-p", "no:doctest",
"-p", "no:legacypath",
]
DJANGO_SETTINGS_MODULE = "tests.settings"
filterwarnings = [
"error",
"ignore:The default scheme will be changed:DeprecationWarning",
]
markers = [
"unit: mark test as unit test",
"integration: mark test as integration test",
"e2e: mark test as end-to-end test",
]
norecursedirs = ["docs", "*.egg-info", ".git", ".tox", "dist", "build", "refcode", "examples"]
python_classes = ["Test*"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
pythonpath = ["."]
testpaths = ["tests"]
[tool.ruff]
exclude = ["refcode/"]
fix = true
line-length = 120
src = ["src/django_program", "tests", "packages/pretalx-client/src/pretalx_client"]
target-version = "py314"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 88
indent-style = "space"
quote-style = "double"
[tool.ruff.lint]
fixable = ["ALL"]
ignore = [
"COM812", # Missing trailing comma (conflicts with formatter)
"ISC001", # Single-line string concatenation (conflicts with formatter)
"ERA001", # Commented-out code
"TD", # TODOs
"FIX002", # Line contains TODO
"EM101", # Exception string literal
"EM102", # Exception f-string literal
"TRY003", # Long exception message
"RUF012", # Mutable class attributes (Django uses these extensively)
"D105", # Missing docstring in magic method (__str__ etc.)
"D106", # Missing docstring in public nested class (Django Meta)
"DJ001", # Avoid using null=True on string fields (not always applicable)
]
select = ["ALL"]
[tool.ruff.lint.isort]
known-first-party = ["django_program", "pretalx_client", "tests"]
[tool.ruff.lint.per-file-ignores]
"**/migrations/**/*.*" = [
"ANN", # Type annotations
"D", # Docstrings
"E501", # Line too long (auto-generated)
"INP001", # Implicit namespace package
"SLF001", # Private member access (Django auto-generated references)
]
"**/management/**/*.*" = [
"ANN401", # Any in management command signatures (Django convention)
"ARG002", # Unused *args in handle() (Django convention)
"N806", # User = get_user_model() (Django convention)
"PLR2004", # Magic values in verbosity checks
]
"docs/conf.py" = [
"A001", # Variable shadowing builtin
"INP001", # Implicit namespace package
"PTH", # Use pathlib
"DTZ", # Datetime timezone
]
"examples/**/*.*" = [
"ANN", # Type annotations (dev scripts)
"C901", # Complexity (seed data generation)
"D", # Docstrings (dev scripts)
"E402", # Import not at top of file (Django bootstrap)
"INP001", # Implicit namespace package (standalone Django project)
"N806", # User = get_user_model() (Django convention)
"PLC0415", # Import not at top level (Django manage.py pattern)
"PLR0912", # Too many branches (seed data)
"PLR0915", # Too many statements (seed data)
"S105", # Hardcoded secret key (dev-only)
"S311", # Pseudo-random (seed data, not crypto)
"S324", # md5 (seed hash, not crypto)
"PLR0913", # Too many args (seed helper methods)
"PLR2004", # Magic values (probability thresholds in seed)
"T201", # Print statements (CLI output)
]
"scripts/**/*.*" = [
"D", # Docstrings (utility scripts)
"INP001", # Implicit namespace package
"S", # Security (local dev scripts)
"T201", # Print statements (CLI scripts)
"ANN", # Type annotations (utility scripts)
"C901", # Complexity (codegen functions are inherently complex)
"PLR0912", # Too many branches (codegen)
"PLR0915", # Too many statements (codegen)
]
"packages/**/tests/**/*.*" = [
"A",
"ANN",
"ARG",
"B",
"BLE",
"C901",
"D",
"DTZ",
"EM",
"ERA001",
"F841",
"FBT",
"G",
"N",
"PGH",
"PIE",
"PLR",
"PLW",
"PTH",
"RET504",
"RSE",
"S",
"S101",
"SIM",
"SLF001",
"TCH",
"TRY",
"UP006",
]
"tests/**/*.*" = [
"A",
"ANN",
"ARG",
"B",
"BLE",
"C901",
"D",
"DTZ",
"EM",
"ERA001",
"F841",
"FBT",
"G",
"N",
"PGH",
"PIE",
"PLC0415",
"PLR",
"PLW",
"PTH",
"RET504",
"RSE",
"S",
"S101",
"SIM",
"SLF001",
"TCH",
"TRY",
"UP006",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ty]
[tool.ty.environment]
python = ".venv"
[tool.ty.rules]
deprecated = "warn"
# Django's ORM dynamically adds .objects, so ty can't resolve it
unresolved-attribute = "warn"
# Django field types (CharField etc.) don't resolve to Python builtins
invalid-return-type = "warn"
# Django field descriptors don't implement SupportsInt/SupportsIndex protocols
unsupported-operator = "warn"
invalid-argument-type = "warn"
[tool.ty.src]
exclude = ["docs/conf.py", "tests/", "refcode/", "packages/*/tests/", "scripts/"]
[tool.uv]
default-groups = ["dev"]
constraint-dependencies = ["django>=5.2,<5.3"]
[tool.uv.sources]
pretalx-client = { workspace = true }
[tool.uv.workspace]
members = ["packages/*"]