118 lines
2.8 KiB
INI
118 lines
2.8 KiB
INI
[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.4
|
|
dbus-next
|
|
PyGObject
|
|
# pywayland has to be installed before pywlroots
|
|
commands =
|
|
pip install pywlroots>=0.14.10
|
|
python3 setup.py -q install
|
|
{toxinidir}/scripts/ffibuild
|
|
# py310 currently fails with -W error, see: https://gitlab.gnome.org/GNOME/pygobject/-/issues/476
|
|
!py310: python3 -m pytest -W error --cov libqtile --cov-report term-missing --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-isort
|
|
flake8-tidy-imports
|
|
pep8-naming
|
|
commands =
|
|
flake8 {toxinidir}/libqtile {toxinidir}/bin/ {toxinidir}/test --exclude=test/configs/syntaxerr.py,**/_ffi*.py
|
|
|
|
[testenv:codestyle]
|
|
deps =
|
|
pylint >= 2.7
|
|
pycodestyle >= 2.7
|
|
skip_install = true
|
|
commands =
|
|
- pylint {toxinidir}/libqtile {posargs}
|
|
pycodestyle --max-line-length=120 --exclude="_*.py" {toxinidir}/libqtile
|
|
|
|
[testenv:docstyle]
|
|
deps =
|
|
pydocstyle >= 5.0
|
|
skip_install = true
|
|
commands =
|
|
- pydocstyle --match "(?!(test)?_).*\.py" libqtile/
|
|
|
|
[testenv:mypy]
|
|
deps =
|
|
mypy == 0.930
|
|
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.4 xkbcommon>=0.3
|
|
pip install pywlroots>=0.14.10
|
|
mypy -p libqtile
|
|
# also run the tests that require mypy
|
|
python3 setup.py -q install
|
|
# 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 = 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
|
|
3.9: py39
|
|
3.10: py310, packaging, pep8, codestyle, docstyle, mypy, docs, vulture
|