File: pyproject.toml

package info (click to toggle)
debusine 0.14.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,344 kB
  • sloc: python: 198,722; sh: 850; javascript: 335; makefile: 117
file content (507 lines) | stat: -rw-r--r-- 17,097 bytes parent folder | download | duplicates (2)
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
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
[build-system]
requires = ["hatchling >= 1.26.0", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"

[tool.hatch.version.raw-options]
git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "[0-9]*"]

[project]
name = "debusine"
dynamic = ["version"]
description = "Debusine is a general purpose software factory tailored to the needs of a Debian-based distribution."
readme = "README.md"
requires-python = ">= 3.13"
license = "GPL-3.0-or-later"
license-files = ["LICENSE"]
authors = [
  { name = "The Debusine Developers", email = "raphael@freexian.com" },
]
classifiers = [
  "Framework :: Django",
  "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3.13",
  "Programming Language :: Python :: 3.14",
  "Operating System :: POSIX :: Linux",
  "Topic :: Software Development",
  "Typing :: Typed",
]
dependencies = [
  "aiohttp >= 3.8.4",               # deb: python3-aiohttp (>= 3.8.4)
  "fasteners",                      # deb: python3-fasteners
  "psutil >= 5.9.4",                # deb: python3-psutil (>= 5.9.4)
  "pydantic >= 2.10.0",             # deb: python3-pydantic (>= 2.10.0)
  "email_validator",                # deb: python3-email-validator
  "pgpy",                           # deb: python3-pgpy
  "prometheus-client",              # deb: python3-prometheus-client
  "python-dateutil",                # deb: python3-dateutil
  "python_debian >= 1.0.0",         # deb: python3-debian (>= 1.0.0)
  "python-magic",                   # deb: python3-magic
  "PyYAML >= 6.0",                  # deb: python3-yaml (>= 6.0)
  "requests >= 2.28.1",             # deb: python3-requests (>= 2.28.1)
  "requests-file",                  # deb: python3-requests-file
  "requests-toolbelt",              # deb: python3-requests-toolbelt
  "rich",                           # deb: python3-rich
  "tenacity >= 8.2.1",              # deb: python3-tenacity (>= 8.2.1)
                                    # Packages not in pypi
                                    # deb: arch-test
                                    # deb: libjs-select2.js
                                    # deb: pre-commit
                                    # deb: sensible-utils (>= 0.0.17)
]

[project.urls]
"Source code" = "https://salsa.debian.org/freexian-team/debusine"

[project.optional-dependencies]
server = [
  "asgiref >= 3.4.1",               # deb: python3-asgiref (>= 3.4.1)
  "boto3 >= 1.36.0",                # deb: python3-boto3 (>= 1.36.0)
  "botocore",                       # deb: python3-botocore
  "celery[redis] >= 5.5.0",         # deb: python3-celery
  "channels",                       # deb: python3-django-channels
  "channels_redis >= 4.0.0",        # deb: python3-channels-redis (>= 4.0.0)
  "Django >= 4.2,<5.3",             # deb: python3-django (>= 3:4.2)
  "django-celery-results",          # deb: python3-django-celery-results
  "django-cte",                     # deb: python3-django-cte
  "django-pglocks",                 # deb: python3-django-pglocks
  "django-pgtransaction",           # deb: python3-django-pgtransaction
  "django-pgtrigger",               # deb: python3-django-pgtrigger
  "django-prometheus",              # deb: python3-django-prometheus
  "djangorestframework >= 3.16.0",  # deb: python3-djangorestframework (>= 3.16.0)
  "fabric",                         # deb: python3-fabric
  "hcloud",                         # deb: python3-hcloud
  "jsonpath-rw >= 1.4.0",           # deb: python3-jsonpath-rw (>= 1.4.0)
  "jwcrypto >= 1.1.0",              # deb: python3-jwcrypto (>= 1.1.0)
  "more_itertools",                 # deb: python3-more-itertools
  "packaging",                      # deb: python3-packaging
  "psycopg[binary]",                # deb: python3-psycopg-c
  "pygments >= 2.14.0",             # deb: python3-pygments (>= 2.14.0)
  "requests-oauthlib >= 1.3.0",     # deb: python3-requests-oauthlib (>= 1.3.0)
  "unidiff",                        # deb: python3-unidiff
  "uvicorn",                        # deb: python3-uvicorn
  # Not used directly, but makes uvicorn websocket pings work properly.
  "websockets",                     # deb: python3-websockets
                                    # Packages not (usefully) in pypi
                                    # deb: libjs-bootstrap5
                                    # deb: python3-apt
]
client = [
  "argcomplete",                    # deb: python3-argcomplete
  "configobj >= 5.0.8",             # deb: python3-configobj (>= 5.0.8)
  "urllib3 >= 2.0.0",               # deb: python3-urllib3 (>= 2.0.0)
  "xkcdpass >= 1.19.3",             # deb: xkcdpass (>= 1.19.3)
]
signing = [
  "Django >= 4.2,<5.3",             # deb: python3-django (>= 3:4.2)
  "psycopg[binary]",                # deb: python3-psycopg-c
  "PyNaCl",                         # deb: python3-nacl
                                    # Packages not (usefully) in pypi
                                    # deb: devscripts
                                    # deb: openssl
                                    # deb: sbsigntool [amd64 arm64 armhf i386 riscv64]
                                    # deb: python3-gpg (>= 1.12.0)
]
tests = [
  "cryptography",                   # deb: python3-cryptography
  # Not used directly, but channels.testing imports it.
  "daphne",                         # deb: python3-daphne
  "lxml >= 4.9.23",                 # deb: python3-lxml
  "paramiko",                       # deb: python3-paramiko
  "pydantic-core",                  # deb: python3-pydantic-core
  "pyftpdlib",                      # deb: python3-pyftpdlib
  "pytest",                         # deb: python3-pytest
  "pytest-asyncio",                 # deb: python3-pytest-asyncio
  "pytest-cov",                     # deb: python3-pytest-cov
  "pytest-django",                  # deb: python3-pytest-django
  "pytest-subtests",                # deb: python3-pytest (>= 9.0.0) | python3-pytest-subtests
  "pytest-xdist",                   # deb: python3-pytest-xdist
  "responses >= 0.21.0",            # deb: python3-responses (>= 0.21.0)
                                    # Packages not in pypi
                                    # deb: dpkg-dev
                                    # deb: dput-ng
                                    # deb: git
]
dev = [
  "coverage >= 7.6.0",              # deb: python3-coverage (>= 7.6.0)
  "django_debug_toolbar >= 3.8.1",  # deb: python3-django-debug-toolbar (>= 1:3.8.1)
  "selenium >= 4.8.3",              # deb: python3-selenium (>= 4.8.3)
  "tox >= 3.28.0",                  # deb: tox (>= 3.28.0)
                                    # Packages not in pypi
                                    # deb: postgresql
                                    # deb: postgresql-client
                                    # deb: redis-server
]
docs = [
  "Sphinx >= 5.3.0",                # deb: python3-sphinx (>= 5.3.0)
  "sphinx_rtd_theme >= 1.2.0",      # deb: python3-sphinx-rtd-theme (>= 1.2.0)
  "sphinx_autobuild >= 2021.3.14",  # deb: python3-sphinx-autobuild (>= 2021.3.14)
  "sphinx_copybutton >= 0.4.0",     # deb: python3-sphinx-copybutton (>= 0.4.0)
                                    # Packages not in pypi
                                    # deb: graphviz
                                    # deb: make
]

[project.scripts]
debusine = "debusine.client.__main__:entry_point"
debusine-worker = "debusine.worker.__main__:entry_point"

# Django-based entry points.  These are sensitive to sys.argv[0].
debusine-admin = "debusine.__main__:main"
debusine-signing = "debusine.__main__:main"

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "debusine.project.settings"
addopts = "-n auto --dist=loadgroup"
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "function"
filterwarnings = [
    # Ignore warnings in our dependencies that we can't do anything about.
    "ignore:The asyncore module is deprecated and will be removed:DeprecationWarning:asynchat",
    "ignore:datetime.datetime.utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:botocore.auth",
    "ignore:SelectableGroups dict interface is deprecated:DeprecationWarning:celery.utils.imports",
    "ignore:the imp module is deprecated in favour of importlib and slated for removal:DeprecationWarning:invoke.loader",
    "ignore:SelectableGroups dict interface is deprecated:DeprecationWarning:kombu.utils.compat",
    # https://github.com/SecurityInnovation/PGPy/pull/443
    "ignore:'imghdr' is deprecated and slated for removal:DeprecationWarning:pgpy.constants",
    "ignore:'crypt' is deprecated and slated for removal:DeprecationWarning:pyftpdlib.authorizers",
    "ignore:'spwd' is deprecated and slated for removal:DeprecationWarning:pyftpdlib.authorizers",
    "ignore:The asynchat module is deprecated and will be removed:DeprecationWarning:pyftpdlib.handlers",
    "ignore:asynchat was removed:DeprecationWarning:pyftpdlib.handlers",
    "ignore:'cgi' is deprecated and slated for removal:DeprecationWarning:twisted.web.http",
    "ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated:DeprecationWarning:xdist.plugin",
]
python_files = ["test_*.py"]

[tool.mypy]
mypy_path = ["debian/tests"]
packages = [
    "debusine",
    "docs._ext",
    "utils",
]
modules = [
    "integration-tests-generic",
    "integration-tests-task-aptmirror",
    "integration-tests-task-mmdebstrap",
    "integration-tests-task-signing",
    "integration-tests-task-simplesystemimagebuild",
    "integration-tests-workflow-debian-pipeline",
]
exclude = [
    '^debusine/project/settings/local\.py$',
    '^debusine/signing/settings/local\.py$',
]
plugins = [
    "mypy_django_plugin.main",
    "mypy_drf_plugin.main",
    "pydantic.mypy",
]
strict = true

[[tool.mypy.overrides]]
module = "apt_pkg"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "celery.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "channels_redis.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "configobj.*"
ignore_missing_imports = true

# This might previously have existed such that there's still a .pyc file
# lying around.  Just ignore it.
[[tool.mypy.overrides]]
module = "debusine.project.settings.local"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "debusine.signing.settings.local"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "debug_toolbar.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "django_celery_results.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "django_cte.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "django_pglocks.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "django_prometheus.testutils"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "dput.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "fabric.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "gpg.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "jsonpath_rw.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "pgpy.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "pyftpdlib.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "pytest.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "requests_toolbelt.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "xkcdpass.*"
ignore_missing_imports = true

[tool.django-stubs]
django_settings_module = "debusine.project.settings"
strict_settings = false

[tool.ruff]
line-length = 80

[tool.ruff.format]
quote-style = "preserve"

[tool.ruff.lint]
exclude = [
    ".git",
    ".ropeproject",
    ".tox",
    "__pycache__",
    "debusine/project/settings/local.py",
    "debusine/signing/settings/local.py",
    "docs/conf.py",
]
external = [
    # flake8-absolute-import; ruff's equivalent uses the TID prefix instead
    "ABS",
    # https://github.com/astral-sh/ruff/issues/13046
    "G200",
    # flake8-rst-docstrings; currently no equivalent in ruff
    "RST",
    # flake8-unused-arguments; ruff's equivalent uses the ARG prefix instead
    "U100",
]
ignore = [
    "D106",     # undocumented-public-nested-class
    "D203",     # incorrect-blank-line-before-class
    "D212",     # multi-line-summary-first-line
    "DJ008",    # django-model-without-dunder-str
    "RUF001",   # ambiguous-unicode-character-string
    "RUF002",   # ambiguous-unicode-character-docstring
    "RUF005",   # collection-literal-concatenation
    "RUF010",   # explicit-f-string-type-conversion
    "RUF012",   # mutable-class-default
    "RUF015",   # unnecessary-iterable-allocation-for-first-element
    "RUF100",   # unused-noqa
    "UP007",    # non-pep604-annotation-union - due to quoted annotations
    "UP031",    # printf-string-formatting
    "UP037",    # quoted-annotation
    "UP040",    # non-pep695-type-alias
    "UP045",    # non-pep604-annotation-optional - due to quoted annotations
]
select = [
    "A",        # flake8-builtins
    "ARG",      # flake8-unused-arguments
    "ASYNC",    # flake8-async
    "C4",       # flake8-comprehensions
    "C90",      # mccabe
    "COM818",   # flake8-commas: trailing-comma-on-bare-tuple
    "D",        # pydocstyle
    "DJ",       # flake8-django
    "E",        # pycodestyle: Error
    "F",        # pyflakes
    "FURB",     # refurb
    "G",        # flake8-logging-format
    "I",        # isort
    "ICN",      # flake8-import-conventions
    "RUF",      # Ruff-specific rules
    "T10",      # flake8-debugger
    "TID",      # flake8-tidy-imports
    "UP",       # pyupgrade
    "W",        # pycodestyle: Warning
]

[tool.ruff.lint.flake8-import-conventions]
banned-from = [
    "datetime",
    "time",
]

[tool.ruff.lint.flake8-import-conventions.extend-aliases]
datetime = "dt"
time = "tm"

[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"

[tool.ruff.lint.flake8-unused-arguments]
ignore-variadic-names = true

[tool.ruff.lint.isort]
case-sensitive = true
known-first-party = [
    "debusine",
    "utils",
]
order-by-type = false

[tool.ruff.lint.mccabe]
max-complexity = 12

[tool.ruff.lint.per-file-ignores]
"*/migrations/[0-9]*.py" = [
    "ARG001",   # unused-function-argument
    "D100",     # undocumented-public-module
    "D101",     # undocumented-public-class
    "D103",     # undocumented-public-function
    "E501",     # line-too-long
]
"debusine/db/migrations/0001_squashed_*.py" = [
    "ICN001",   # unconventional-import-alias
]
"*tests/test_*.py" = [
    "D102",     # undocumented-public-method (unfortunately cannot be
                # ignored only in test_* methods)
    "D205",     # missing-blank-line-after-summary
    "D400",     # missing-trailing-period
    "D401",     # non-imperative-mood
    "D415",     # missing-terminal-punctuation
]

[tool.ruff.lint.pydocstyle]
convention = "pep257"
ignore-decorators = [
    "override",
]

[tool.codespell]
skip = '.git,*.pdf,*.svg,*.min.js,.coverage,_build'

[tool.pylint.MAIN]
max-line-length = 80

[tool.pylint.'MESSAGES CONTROL']
disable = "too-many-instance-attributes,too-many-locals,too-many-public-methods,too-few-public-methods"

[tool.djlint]
profile="django"
custom_blocks="withscope"
# H006: Img tag should have height and width attributes
# H021: Inline styles should be avoided
# H023: Do not use entity references
# H030: Consider adding a meta description
# H031: Consider adding meta keywords
# T003: Endblock should have name
ignore="H006,H021,H023,H030,H031,T003"

[tool.vulture]
min_confidence = 80
paths = ["debusine"]
exclude = ["debusine/db/migrations/"]
ignore_names = [
  "OpenBinaryModeWriting",
  "OpenTextModeWriting",
  "PublicKey",
  "_LoggingWatcher",
  "_MonkeyPatchedWSGIResponse",
  "_RequestContextManager",
  "app_configs",
]

[tool.towncrier]
directory = "newsfragments"
filename = "docs/reference/release-history.rst"
template = "newsfragments/release-history-template.rst"
issue_format = ":issue:`{issue}`"
underlines = ["-", "~", "^"]
wrap = true

[[tool.towncrier.section]]
name = "Server"
path = "server"

[[tool.towncrier.section]]
name = "Web UI"
path = "web"

[[tool.towncrier.section]]
name = "Client"
path = "client"

[[tool.towncrier.section]]
name = "Workflows"
path = "workflows"

[[tool.towncrier.section]]
name = "Tasks"
path = "tasks"

[[tool.towncrier.section]]
name = "Worker"
path = "worker"

[[tool.towncrier.section]]
name = "Signing"
path = "signing"

[[tool.towncrier.section]]
name = "General"
path = ""

[[tool.towncrier.type]]
directory = "incompatible"
name = "Incompatible Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "Features"
showcontent = true

[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug Fixes"
showcontent = true

[[tool.towncrier.type]]
directory = "doc"
name = "Documentation"
showcontent = true

[[tool.towncrier.type]]
directory = "misc"
name = "Miscellaneous"
showcontent = false