-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
80 lines (71 loc) · 2.38 KB
/
tox.ini
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
[tox]
envlist = test, lint
minversion = 2.5.0
isolated_build = true
[testenv]
basepython = python3.9
deps =
-rrequirements.txt
setenv =
YARRHARR_CONF={env:YARRHARR_CONF:{toxinidir}/yarrharr/tests/dev.ini}
YARRHARR_TESTING=yes
DJANGO_SETTINGS_MODULE=yarrharr.settings
PYTHONDONTWRITEBYTECODE=yes
; This must remain disabled due to https://github.com/twisted/treq/issues/226
; POISON_REACTOR=yes
[testenv:test]
usedevelop = true
deps =
{[testenv]deps}
-rrequirements_test.txt
changedir =
; SynchronousTestCase.mktemp() creates a directory named for the test in the
; working directory, so put that somewhere temporary:
{envtmpdir}
commands =
pytest {toxinidir}/yarrharr {posargs}
django-admin makemigrations --dry-run --check
[testenv:run]
usedevelop = true
commands = {posargs:django-admin --help}
[testenv:static]
description = Compress static assets for production deployment
skip_install = true
deps = -rrequirements_static.txt
commands = {envpython} {toxinidir}/bin/compile-static.py {posargs:--compress}
[testenv:lint]
description = Lint the codebase
skip_install = true
deps = -rrequirements_lint.txt
commands =
ruff check yarrharr
ruff format --check yarrharr
[testenv:deps]
description = Pin dependencies
skip_install = true
deps = pip-tools
commands =
pip-compile --output-file requirements_lint.txt requirements_lint.in {posargs}
pip-compile --output-file requirements_static.txt requirements_static.in {posargs}
pip-compile --output-file requirements.txt pyproject.toml {posargs}
pip-compile --output-file requirements_test.txt requirements_test.in {posargs}
pip-compile --output-file requirements_release.txt requirements_release.in {posargs}
[testenv:release]
skip_install = true
deps = -rrequirements_release.txt
[flake8]
exclude =
yarrharr/wsgi.py
yarrharr/migrations/*.py
max-line-length = 150
extend-ignore = E203
[pytest]
filterwarnings=
all
ignore::ImportWarning
# This is a Twisted bug, see https://twistedmatrix.com/trac/ticket/8227 and https://twistedmatrix.com/trac/ticket/8929
ignore:Using readBody with a transport that does not have an abortConnection method:DeprecationWarning
# Tracked in https://github.com/twm/yarrharr/issues/659
ignore:html5lib's sanitizer:DeprecationWarning
# Tracked in https://github.com/twisted/twisted/issues/12172
ignore:twisted.web.resource._Unsafe:DeprecationWarning: