forked from resource-hub-dev/rhub-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
87 lines (70 loc) · 1.57 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
[tox]
envlist = package_build,py3,flake8,yamllint,openapi,bandit,pip_audit
minversion = 4.0.0
[testenv]
package = editable-legacy
setenv =
file|.env.defaults
deps =
-rrequirements.txt
pytest
pytest-mock
commands = pytest {tty:--color=yes} -vv {posargs:tests}
[testenv:flake8]
skip_install = true
# https://github.com/PyCQA/flake8-import-order/issues/189
# flake8-bugbear pinned because of new rules in 23
deps =
flake8 < 6.0
flake8-bugbear <= 22
flake8-import-order
commands = flake8 {posargs:src bin migrations}
[flake8]
max-line-length = 120
select = C,E,F,W,B,I
ignore = W503
import-order-style = pep8
application-import-names = rhub
exclude = .tox,*.egg,build
extend-exclude = migrations/versions/
[testenv:yamllint]
skip_install = true
deps = yamllint
commands = yamllint src
[testenv:openapi]
skip_install = true
commands = prance validate src/rhub/openapi/openapi.yml
[testenv:package_build]
deps =
check-manifest >= 0.42
commands =
check-manifest
python setup.py check -m -s
[check-manifest]
ignore =
.dockerignore
.readthedocs.yml
.yamllint
bin/**
config/logging.example.yml
data/vault.example.yml
docker-compose.yml
Dockerfile
docs/**
Makefile
releasenotes/**
sonar-project.properties
tests/**
tox.ini
config/rabbitmq/*
[testenv:bandit]
deps = bandit
commands = bandit --ini tox.ini {posargs}
[bandit]
exclude = .tox,build,dist,tests
recursive = true
targets = src
[testenv:pip_audit]
skip_install = true
deps = pip-audit
commands = pip-audit {posargs:--no-deps -r requirements.txt}