forked from sensynehealth/polaris-rules-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
executable file
·76 lines (67 loc) · 2.12 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]
skipsdist = True
envlist = lint,py39
source_package = dhos_rules_api
all_sources = {[tox]source_package} tests/ integration-tests/
[flake8]
max-line-length = 100
[pytest]
filterwarnings =
ignore::DeprecationWarning:jose
[testenv]
envdir = {toxworkdir}/py39
setenv = REDIS_INSTALLED = False
RABBITMQ_NOENCRYPT = TRUE
ENVIRONMENT = DEVELOPMENT
IGNORE_JWT_VALIDATION = True
AUTH0_AUDIENCE=https://dev.sensynehealth.com/
PROXY_URL = http://localhost/
HS_KEY = secret
DHOS_RULES_ENGINE_URL = http://dhos-rules-engine
LOG_FORMAT = COLOUR
LOG_LEVEL = DEBUG
FLASK_APP={[tox]source_package}/autoapp.py
DHOS_TRUSTOMER_API_HOST=http://dhos-trustomer
CUSTOMER_CODE=test
POLARIS_API_KEY=secret
commands = poetry install -v
black --check {[tox]source_package} tests/
isort --profile black {[tox]source_package} tests/ --check-only
mypy {[tox]source_package}
bandit -r dhos_rules_api -lll
safety check
coverage run --source dhos_rules_api -m py.test {posargs}
coverage report
coverage xml -i -o coverage-reports/coverage.xml
allowlist_externals =
bandit
black
coverage
isort
npx
mypy
poetry
python
safety
sh
true
list_dependencies_command = true
[testenv:lint]
description = Run black, isort, and mypy to clean up source files
commands =
black {[tox]all_sources}
isort --profile black {[tox]all_sources}
mypy {[tox]source_package} tests/
[testenv:debug]
description = Run last failing unit test and invoke debugger on errors
commands =
pytest --lf --pdb
[testenv:update]
description = Update poetry lock files
commands = poetry update
[testenv:openapi]
description = Recreate API specification (openapi.yaml) from Flask blueprint
commands =
poetry install
python -m flask create-openapi {toxinidir}/{[tox]source_package}/openapi/openapi.yaml
npx markdown-swagger {toxinidir}/{[tox]source_package}/openapi/openapi.yaml {toxinidir}/README.md