forked from qtile/qtile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
123 lines (114 loc) · 3.14 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
123
[tox]
skip_missing_interpreters = True
skipsdist=True
minversion = 1.8
envlist =
pypy3,
py37,
py38,
py39,
py310,
docs,
pep8,
codestyle,
docstyle,
mypy,
packaging,
vulture
[testenv]
# This is required in order to get UTF-8 output inside of the subprocesses
# that our tests use.
setenv = LC_CTYPE = en_US.UTF-8
# Pass Display down to have it for the tests available
passenv = DISPLAY WAYLAND_DISPLAY
whitelist_externals=convert
# xcffib has to be installed before cairocffi
deps =
pytest >= 6.2.1
pytest-cov >= 2.10.1
setuptools >= 40.5.0
xcffib >= 0.10.1
bowler
xkbcommon >= 0.3
pywayland >= 0.4.12
dbus-next
PyGObject
# pywayland has to be installed before pywlroots
commands =
pip install cairocffi
pip install pywlroots>=0.15.13,<0.16.0
python3 setup.py -q install
{toxinidir}/scripts/ffibuild
# py310 currently fails with -W error, see: https://gitlab.gnome.org/GNOME/pygobject/-/issues/476
# pypy3 is very slow when running coverage reports so we skip it (coverage is reported on py37 to py310)
!py310-!pypy3: python3 -m pytest -W error --cov libqtile --cov-report term-missing --backend=x11 --backend=wayland {posargs}
pypy3: python3 -m pytest -W error --backend=x11 --backend=wayland {posargs}
py310: python3 -m pytest --cov libqtile --cov-report term-missing --backend=x11 --backend=wayland {posargs}
[testenv:packaging]
deps =
check-manifest
twine
commands =
check-manifest
python3 setup.py check -m -s
python3 setup.py sdist
twine check dist/*
[testenv:pep8]
deps =
flake8
flake8-black>=0.2.4
flake8-isort
flake8-tidy-imports
flake8-logging-format
pep8-naming
commands =
flake8 {toxinidir}/libqtile {toxinidir}/bin/ {toxinidir}/test --exclude=test/configs/syntaxerr.py,**/_ffi*.py
[testenv:codestyle]
deps =
pycodestyle >= 2.7
skip_install = true
commands =
pycodestyle --max-line-length=98 --exclude="_*.py" --ignore=E203,E501,W503 {toxinidir}/libqtile
[testenv:docstyle]
deps =
pydocstyle >= 5.0
skip_install = true
commands =
- pydocstyle --match "(?!(test)?_).*\.py" libqtile/
[testenv:mypy]
deps =
mypy == 0.931
bowler
dbus-next
xcffib >= 0.10.1
PyGObject
pytest >= 6.2.1
types-python-dateutil
types-pytz
types-pkg_resources
commands =
pip install -r requirements.txt pywayland>=0.4.12 xkbcommon>=0.3
pip install pywlroots>=0.15.13,<0.16.0
mypy -p libqtile
# also run the tests that require mypy
pip install .
{toxinidir}/scripts/ffibuild
# py310 currently fails with -W error, see: https://gitlab.gnome.org/GNOME/pygobject/-/issues/476
python3 -m pytest -- test/test_check.py test/test_migrate.py
[testenv:docs]
deps = -r{toxinidir}/docs/requirements.txt
commands =
pip install -r{toxinidir}/requirements.txt
python3 setup.py build_sphinx -W
[testenv:vulture]
deps =
vulture
commands =
vulture --min-confidence=100 --exclude test/configs/syntaxerr.py libqtile test
[gh-actions]
python =
pypy-3.7: pypy3
3.7: py37
3.8: py38, mypy
3.9: py39, mypy
3.10: py310, mypy, packaging, pep8, codestyle, docstyle, vulture