-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
75 lines (62 loc) · 1.5 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
[tox]
skipsdist = True
skip_missing_interpreters = true
envlist = py38,py39
[testenv]
whitelist_externals = poetry
sudo
skip_install = true
envdir = {toxworkdir}/globalenv
commands_pre =
- poetry install
commands =
- poetry run pytest --cov=. {posargs} web/
[testenv:lint]
commands =
poetry run black --check --diff web/
poetry run isort -c --diff --stdout web/
poetry run flake8 {posargs} web/
[testenv:security]
commands =
poetry show --no-dev
poetry run safety check --full-report
[testenv:build]
commands_pre =
commands = poetry build
[testenv:docs]
commands = poetry run make -C docs/ html {posargs}
[testenv:reformat]
commands =
poetry run isort web/
poetry run black web/
[flake8]
max_line_length = 100
exclude = migrations,tests
ignore = BLK100,E203,E231,W503,D100,D101,D102,D103,D104,D105,D106,D107,RST215,RST214,F821,F841,S106,T100,T101,DJ05
[isort]
profile = black
line_length = 100
default_section = THIRDPARTY
known_first_party = web
known_django = django
skip = migrations
sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
[mypy]
plugins = mypy_django_plugin.main
python_version = 3.8
platform = linux
show_column_numbers = True
follow_imports = skip
ignore_missing_imports = True
cache_dir = /dev/null
[mypy.plugins.django-stubs]
django_settings_module = web.tinventory.settings
[pytest]
DJANGO_SETTINGS_MODULE = web.tinventory.settings
junit_family = legacy
[coverage:run]
omit =
*/migrations/*
*/tests/*
.tox/*
web/manage.py