-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
121 lines (111 loc) · 2.61 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# content of: tox.ini , put in same dir as setup.py
[tox]
minversion = 3.3.0
envlist = py39,py310,py311
isolated_build = True
skip_missing_interpreters = true
[testenv]
deps=
hypothesis
pytest
pytest-cov
pytest-subtests
pytest-xdist
setenv =
COVERAGE_FILE={toxworkdir}/.coverage/.coverage.{envname}
commands=
pytest {posargs: -v --cov=audio_feeder --cov=tests -n auto} {toxinidir}
[testenv:coverage-report]
skip_install = true
deps = coverage[toml]>=5.0.2
depends = py39,py310,py311
setenv=COVERAGE_FILE=.coverage
changedir = {toxworkdir}/.coverage
commands =
coverage combine
coverage report
coverage xml
[testenv:font]
description = Bundle the subset of the font-awesome font that we want
skip_install = True
basepython = python3.10
deps =
fonttools[woff]>=4.38.0
click
requests
commands =
python scripts/bundle_fa_subset.py {posargs}
[testenv:record_updates]
description = Record sessions for the test database
basepython = python3.10
deps =
click
commands =
python -m scripts.record_responses {posargs: --media-dir={toxinidir}/tests/data/example_media \
--output={toxinidir}/tests/data/example_google_books_responses.json}
[testenv:start_server]
description = "Start up a test server"
basepython = python3.10
passenv = AF_*
deps =
click
commands =
python -m scripts.start_test_server {posargs}
[testenv:lint]
description = Run linting checks
skip_install = True
deps =
black
isort>=5.0.0
pylint
commands =
black --check .
isort --check-only scripts src tests
pylint scripts src tests
[testenv:format]
description = Run auto formatters
skip_install = True
deps =
black
isort>=5.0.0
commands =
black .
isort src tests scripts
; types-cryptography is a transitive dependency via flask
[testenv:typing]
description = Run typechecking
deps =
attrs
click
mypy>=0.991,<1
types-requests
types-lxml
types-pyyaml
types-pillow
types-cryptography
types-sqlalchemy
typing_extensions; python_version<'3.11'
commands =
mypy {posargs} {toxinidir}/scripts {toxinidir}/src
[testenv:build]
description = Build a wheel and source distribution
skip_install = True
passenv = *
deps =
build
virtualenv
commands =
python -m build {posargs} {toxinidir} -o {toxinidir}/dist
[testenv:release]
description = Make a release; must be called after "build"
skip_install = True
deps =
twine
depends =
build
passenv =
TWINE_*
commands =
twine check {toxinidir}/dist/*
twine upload {toxinidir}/dist/* \
{posargs:-r {env:TWINE_REPOSITORY:testpypi} --non-interactive}