-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
122 lines (103 loc) · 2.56 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
120
121
122
[tox]
isolated_build = True
skip_install = True
envlist =
isort-check
black-check
flake8-check
pylint-check
py{39,310,311,312}
coverage-report
clean
skip_missing_interpreters = True
basepython=py311
[testenv]
deps = .[testing]
commands = py.test src \
--cov-append \
--cov=src/ \
--cov-config="{toxinidir}/tox.ini"
[testenv:flake8-check]
deps = flake8==6.1.0
commands = flake8 --config={toxinidir}/tox.ini src/
[testenv:pylint-check]
deps =
.[testing]
pylint==3.0.3
commands = pylint src/tests/ --rcfile={toxinidir}/tox.ini
pylint src/clickhouse_migrations/ --rcfile={toxinidir}/tox.ini
[testenv:isort]
changedir = {toxinidir}/src
deps = isort==5.10.1
commands = isort . -sp={toxinidir}/tox.ini
[testenv:isort-check]
changedir = {toxinidir}/src
deps = isort==5.10.1
commands = isort . --check-only -sp={toxinidir}/tox.ini
[testenv:black]
changedir = {toxinidir}/src
deps = black==22.6.0
commands = black .
[testenv:black-check]
changedir = {toxinidir}/src
deps = black==22.6.0
commands = black --check .
[testenv:coverage-report]
deps =
coverage==6.4.3
commands =
coverage html
coverage report --include="src/clickhouse_migrations/*" --fail-under=99 -m
coverage report --include="src/tests/*" --fail-under=100 -m
coverage xml
[testenv:gen_docs]
deps = -r docs/requirements.txt
commands =
sphinx-build -b html docs/source/ docs/build/
[testenv:build_wheel]
deps =
build
commands =
python3 -c "import shutil; import os; [shutil.rmtree(os.path.join(os.getcwd(), p), ignore_errors=True) for p in ['build', 'dist']];"
python3 -m build
[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
deps =
commands =
pip install --extra-index-url https://pypi.org/simple -i https://test.pypi.org/simple/ clickhouse-migrations
[testenv:pypi_upload]
passenv = TWINE_USERNAME, TWINE_PASSWORD
deps =
twine
commands =
python -m twine upload dist/*
[testenv:pypi_venv]
skip_install = True
deps =
commands =
pip install clickhouse-migrations
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
########
# pylint
[pylint.main]
max-line-length=120
# C0114: Missing module docstring
# C0116: Missing function or method docstring
disable=fixme, invalid-name, R0801, W0621, C0116, C0114, R0913, C0115
[flake8]
max-line-length=120
ignore=E203,E231,W503
[isort]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88