-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
76 lines (68 loc) · 2.03 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
[tox]
envlist = pip-compile, docs, lint, mypy, security, py39, py310, py311, py312, py313
[testenv]
envdir = {toxworkdir}/shared-environment
setenv =
REQUESTS_CA_BUNDLE = {env:REQUESTS_CA_BUNDLE}
PIP_INDEX_URL = {env:PIP_INDEX_URL:https://pypi.org/simple/}
deps=
-r requirements-test.txt
usedevelop=true
commands=
pytest -vv \
--cov-config .coveragerc --cov=starmap_client --cov-report term \
--cov-report xml --cov-report html {posargs}
[testenv:pip-compile]
basepython = python3.9
skip_install = true
deps = pip-tools
commands =
pip-compile -U --generate-hashes --reuse-hashes --output-file=requirements.txt
pip-compile -U --generate-hashes --reuse-hashes --output-file=requirements-test.txt setup.py requirements-test.in
[testenv:docs]
basepython = python3.9
use_develop=true
commands=
sphinx-build -M html docs docs/_build
[testenv:lint]
skip_install = true
deps =
black
flake8
flake8-docstrings
isort
mypy
commands =
isort -l 100 --profile black --check --diff starmap_client tests
black -S -t py39 -l 100 --check --diff starmap_client tests
flake8 --max-line-length=100 --ignore=D100,D104,D105 --per-file-ignores=tests/*:D101,D102,D103 starmap_client tests
[testenv:mypy]
basepython = python3.9
deps = -r requirements-test.txt
commands = mypy --ignore-missing-imports --exclude '^venv.*' .
[testenv:security]
skip_install = true
deps =
bandit
safety
pip-audit
commands =
bandit -s B303 -r starmap_client
safety check -r requirements.txt
pip-audit -S -s pypi --index-url {env:PIP_INDEX_URL} -r requirements.txt
pip-audit -S -s osv --index-url {env:PIP_INDEX_URL} -r requirements.txt
[testenv:autoformat]
skip_install = true
deps =
black
isort
commands =
black -S -t py39 -l 100 starmap_client tests
isort -l 100 --profile black starmap_client tests
[testenv:coverage]
basepython = python3.9
deps = -r requirements-test.txt
relative_files = True
usedevelop= True
commands=
pytest --cov-report=html --cov-report=xml --cov=starmap_client {posargs}