-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
executable file
·90 lines (80 loc) · 2.79 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
[tox]
skipsdist = True
envlist = lint,py39
source_package = dhos_notifications_api
all_sources = {[tox]source_package} tests/
[flake8]
max-line-length = 100
[testenv]
envdir = {toxworkdir}/py39
setenv = REDIS_INSTALLED = False
RABBITMQ_NOENCRYPT = TRUE
ENVIRONMENT = DEVELOPMENT
CUSTOMER_CODE = DEV
TOKEN_URL = https://draysonhealth-sandbox.eu.auth0.com/oauth/token
AUTH0_DOMAIN = https://login-sandbox.sensynehealth.com/
AUTH0_AUDIENCE = https://dev.sensynehealth.com/
AUTH0_METADATA = https://gdm.sensynehealth.com/metadata
AUTH0_JWKS_URL = https://login-sandbox.sensynehealth.com/.well-known/jwks.json
AUTH0_HS_KEY = secret
TOKEN_URL = https://draysonhealth-sandbox.eu.auth0.com/oauth/token
AUTH0_MGMT_CLIENT_ID = fake
AUTH0_MGMT_CLIENT_SECRET = fake
AUTH0_AUTHZ_CLIENT_ID = fake
AUTH0_AUTHZ_CLIENT_SECRET = fake
AUTH0_AUTHZ_WEBTASK_URL = http://somefakeurl
AUTH0_CLIENT_ID = test_client_id
NONCUSTOM_AUTH0_DOMAIN = https://fakeurl
PROXY_URL = http://localhost/
HS_KEY = secret
LOG_LEVEL = DEBUG
LOG_FORMAT = COLOUR
SMTP_HOST = dummy
SMTP_AUTH_PASS = dummy
SMTP_AUTH_USER = dummy
EMAIL_SENDER = dummy
DISABLE_EMAIL_SEND = False
IGNORE_JWT_VALIDATION = True
FLASK_APP={[tox]source_package}/autoapp.py
passenv = PIP_EXTRA_INDEX_URL
commands = poetry install -v
black --check {[tox]source_package} tests/
isort {[tox]source_package} tests/ --check-only
mypy {[tox]source_package}
bandit -r {[tox]source_package} -lll
safety check
coverage run --source {[tox]source_package} -m py.test {posargs}
coverage report
coverage xml -i -o coverage-reports/coverage.xml
allowlist_externals =
bandit
bash
black
coverage
isort
mypy
npx
poetry
python
safety
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