-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
101 lines (94 loc) · 3.98 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[pytest]
filterwarnings =
error
; Suppress warnings about an import of `imp` by Pyramid
ignore:the imp module is deprecated in favour of importlib
; Annoying errors raised in pywb.rewrite.cookie_rewriter
ignore:invalid escape sequence
; Mostly from importing pywb.apps.frontendapp.FrontEndApp
ignore:Monkey-patching ssl after ssl has already been imported may lead to errors.*:gevent.monkey.MonkeyPatchWarning:
; pkg_resources is calling its own deprecated function? Anyway I don't think the problem is with us.
ignore:^Deprecated call to .pkg_resources\.declare_namespace\('.*'\).\.:DeprecationWarning:pkg_resources
; pkg_resources used in some of our dependencies
ignore:^pkg_resources is deprecated as an API:DeprecationWarning:pkg_resources
ignore:^pkg_resources is deprecated as an API:DeprecationWarning:gevent
ignore:^pkg_resources is deprecated as an API:DeprecationWarning:pywb
# https://github.com/webpy/webpy/issues/732
ignore:^'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning:webob
ignore:^'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning:pywb
# importlib warning triggered by py3amf
ignore:ModuleFinder\.find_spec\(\) not found; falling back to find_module\(\):ImportWarning:importlib
xfail_strict=true
[tox]
envlist = tests
skipsdist = true
requires =
tox>=3.16.1,<4
tox-faster
tox-pyenv
tox-run-command
tox-envfile
tox_pyenv_fallback = false
[testenv]
skip_install = true
setenv =
PYTHONUNBUFFERED = 1
dev: NEW_RELIC_APP_NAME = {env:NEW_RELIC_APP_NAME:viahtml}
dev: NEW_RELIC_ENVIRONMENT = {env:NEW_RELIC_ENVIRONMENT:dev}
dev: SENTRY_ENVIRONMENT = {env:SENTRY_ENVIRONMENT:dev}
dev: CHECKMATE_URL = http://localhost:9099
dev: CHECKMATE_API_KEY = dev_api_key
dev: CHECKMATE_ALLOW_ALL = {env:CHECKMATE_ALLOW_ALL:true}
dev: CHECKMATE_IGNORE_REASONS = {env:CHECKMATE_IGNORE_REASONS:publisher-blocked}
dev: VIA_BLOCKLIST_PATH = conf/blocklist-dev.txt
dev: VIA_DISABLE_AUTHENTICATION = {env:VIA_DISABLE_AUTHENTICATION:0}
OBJC_DISABLE_INITIALIZE_FORK_SAFETY = YES
passenv =
HOME
dev: VIA_BLOCKLIST_URL
dev: VIA_BLOCKLIST_PATH
dev: CHROME_EXTENSION_ID
dev: SENTRY_DSN
dev: NEW_RELIC_LICENSE_KEY
dev: NGINX_SERVER
dev: CLIENT_EMBED_URL
dev: LEGACY_VIA_URL
deps =
-r requirements/{env:TOX_ENV_NAME}.txt
depends =
coverage: tests
whitelist_externals =
dev: gunicorn
dev: newrelic-admin
update-pdfjs: sh
commands =
pip-sync-faster requirements/{env:TOX_ENV_NAME}.txt --pip-args '--disable-pip-version-check'
dev: {posargs:supervisord -c conf/supervisord-dev.conf}
lint: pydocstyle --explain viahtml
lint: pydocstyle --config tests/.pydocstyle --explain tests
lint: pydocstyle --explain viahtml
lint: pydocstyle --config tests/.pydocstyle --explain tests
lint: pylint {posargs:viahtml bin}
lint: pylint --rcfile=tests/.pylintrc tests
format: black viahtml tests bin
format: isort --quiet --atomic viahtml tests bin
checkformatting: black --check viahtml tests bin
checkformatting: isort --quiet --check-only viahtml tests bin
tests: coverage run -m pytest {posargs:tests/unit}
coverage: -coverage combine
coverage: coverage report
functests: pytest {posargs:tests/functional/}
build: python bin/build_static.py
build: python -m whitenoise.compress --no-brotli static
[testenv:dev]
# By default when you Ctrl-c the `make dev` command tox is too aggressive about
# killing supervisor. tox kills supervisor before supervisor has had time to
# stop or kill its child processes, resulting in detached child processes being
# left running and other problems.
#
# Fix this by configuring tox to wait a long time before sending any further
# SIGINTs (after the first one) or SIGTERMs or SIGKILLs to supervisor.
# Just trust supervisor to clean up all its child processes and stop.
suicide_timeout = 60.0
interrupt_timeout = 60.0
terminate_timeout = 60.0