forked from RedHatInsights/insights-rbac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
65 lines (61 loc) · 1.74 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
[tox]
envlist = lint, py39, mypy
skipsdist = True
[flake8]
; D106 = Missing docstring in public nested class (warning form flake8-docstrings https://www.pydocstyle.org/en/stable/error_codes.html)
; W503 = Line break before binary operator (https://www.flake8rules.com/rules/W503.html)
; C901 = Function is too complex (https://www.flake8rules.com/rules/C901.html)
ignore = D106,W503,C901
inline-quotes = "
max-complexity = 10
max-line-length = 120
exclude =
**/migrations/*.py
**/manage.py
**/settings.py
import-order-style = pycharm
application-import-names = rbac, api
[testenv]
;passenv = CI TRAVIS TRAVIS_*
setenv =
LOG_TEST_OUTPUT={env:LOG_TEST_OUTPUT:False}
LOG_DATABASE_QUERIES={env:LOG_DATABASE_QUERIES:False}
DATABASE_NAME={env:DATABASE_NAME:postgres}
DATABASE_HOST={env:DATABASE_HOST:localhost}
DATABASE_PORT={env:DATABASE_PORT:15432}
DATABASE_USER={env:DATABASE_USER:postgres}
DATABASE_PASSWORD={env:DATABASE_PASSWORD:postgres}
PGPASSWORD={env:PGPASSWORD:postgres}
TESTING_APPLICATION=app
ROLE_CREATE_ALLOW_LIST=cost-management
V2_MIGRATION_APP_EXCLUDE_LIST=approval
NOTIFICATIONS_TOPIC=platform.notifications.ingress
EXTERNAL_SYNC_TOPIC=platform.rbac.sync
EXTERNAL_CHROME_TOPIC=platform.chrome
MOCK_KAFKA=True
KAFKA_ENABLED=True
API_PATH_PREFIX=/api/rbac
deps =
faker
coverage
-rrequirements.txt
commands =
coverage run {toxinidir}/rbac/manage.py test --failfast -v 2 {posargs: tests/}
coverage report --show-missing
[testenv:lint]
deps =
flake8
flake8-docstrings
flake8-import-order
flake8-quotes
black==24.10.0
setenv =
PYTHONPATH={toxinidir}
commands =
flake8 rbac
black --check -t py39 -l 119 rbac tests --diff
[testenv:mypy]
deps =
mypy
commands =
mypy --install-types --non-interactive rbac