-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
119 lines (100 loc) · 2.32 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[tox]
minversion = 3.20.0
envlist =
isort-check
black-check
flake8-check
pylint-check
py{36,37,38,39,310,311}
coverage_report
skip_missing_interpreters = True
basepython = py37
[testenv]
deps =
-r requirements.txt
-r requirements-test.txt
commands = pytest \
--cov=src/ \
--cov-config="{toxinidir}/tox.ini" \
--cov-append
[testenv:flake8-check]
deps = flake8==3.7.9
commands = flake8 --config=tox.ini src/
[testenv:pylint-check]
deps =
{[testenv]deps}
pylint==2.4.4
commands = pylint --rcfile=tox.ini src/
[testenv:isort]
changedir = {toxinidir}/src
deps = isort==4.3.21
commands = isort -y -sp={toxinidir}/tox.ini
[testenv:isort-check]
changedir = {toxinidir}/src
deps = isort==4.3.21
commands = isort --check-only -sp={toxinidir}/tox.ini
[testenv:black]
deps = black==22.3.0
commands = black src/
[testenv:black-check]
deps = black==22.3.0
commands = black --check src/
[testenv:coverage_report]
deps =
coverage==6.4.3
codecov==2.0.15
commands =
coverage html
coverage report --include="src/graceful_shutdown/*" --fail-under=99 -m
coverage report --include="src/tests/*" --fail-under=100 -m
coverage xml
[testenv:gen_docs]
skip_install = True
deps = -r docs/requirements.txt
commands =
sphinx-build -b html docs/source/ docs/build/
[testenv:build_wheel]
deps =
wheel
docutils
pygments
commands =
python -c "import shutil; import os; [shutil.rmtree(os.path.join(os.getcwd(), p), ignore_errors=True) for p in ['build', 'dist']];"
python setup.py sdist bdist_wheel
[testenv:test_upload]
deps =
twine
commands =
python -m twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*
[testenv:test_venv]
skip_install = True
commands =
pip install --extra-index-url https://pypi.org/simple -i https://test.pypi.org/simple/ graceful-shutdown-py
[testenv:pypi_upload]
deps =
twine
commands =
python -m twine upload dist/*
[testenv:twine_check]
deps =
twine
commands =
twine check dist/*
[testenv:pypi_venv]
skip_install = True
deps =
commands =
pip install graceful-shutdown-py
########
# pylint
[MESSAGES CONTROL]
disable=fixme,invalid-name
[flake8]
max-line-length=88
ignore=E203,E231
[isort]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88