2013-12-19 15:51:33 +00:00
|
|
|
[tox]
|
2018-05-09 10:11:01 +00:00
|
|
|
envlist = py34, py35, py36, py37, pypy, pylint
|
2015-12-14 15:56:33 +00:00
|
|
|
skip_missing_interpreters = true
|
2015-03-03 21:13:25 +00:00
|
|
|
|
|
|
|
[testenv:pylint]
|
|
|
|
deps =
|
2017-08-09 13:14:00 +00:00
|
|
|
git+https://github.com/pycqa/astroid@master
|
2016-04-30 11:07:15 +00:00
|
|
|
isort
|
2015-12-14 15:56:33 +00:00
|
|
|
|
2016-07-07 14:14:41 +00:00
|
|
|
commands = pylint -rn --rcfile={toxinidir}/pylintrc --load-plugins=pylint.extensions.docparams, pylint.extensions.mccabe {envsitepackagesdir}/pylint
|
2015-03-03 21:13:25 +00:00
|
|
|
|
2018-09-17 07:07:02 +00:00
|
|
|
|
|
|
|
[testenv:formatting]
|
|
|
|
basepython = python3
|
|
|
|
deps = black==18.6b4
|
|
|
|
commands = black --check --exclude "functional|input|test/extension|test/regrtest_data|test/data" pylint
|
|
|
|
changedir = {toxinidir}
|
|
|
|
|
2018-07-23 17:20:58 +00:00
|
|
|
[testenv:mypy]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
mypy
|
|
|
|
|
|
|
|
commands =
|
2018-08-17 07:46:45 +00:00
|
|
|
python -m mypy {toxinidir}/pylint/checkers --ignore-missing-imports
|
2018-07-23 17:20:58 +00:00
|
|
|
|
2013-12-19 15:51:33 +00:00
|
|
|
[testenv]
|
|
|
|
deps =
|
2018-02-04 16:19:25 +00:00
|
|
|
https://github.com/PyCQA/astroid/tarball/master#egg=astroid-master-2.0
|
2016-04-26 13:53:30 +00:00
|
|
|
coverage
|
2016-04-30 11:07:15 +00:00
|
|
|
isort
|
2016-05-09 08:56:34 +00:00
|
|
|
mccabe
|
2016-12-02 17:09:18 +00:00
|
|
|
pytest
|
2016-12-30 15:53:05 +00:00
|
|
|
pytest-xdist
|
2015-11-07 16:16:06 +00:00
|
|
|
|
2016-04-26 13:53:30 +00:00
|
|
|
setenv =
|
|
|
|
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
|
|
|
|
|
|
|
|
commands =
|
2016-12-18 12:25:14 +00:00
|
|
|
python -Wi {envsitepackagesdir}/coverage run -m pytest {envsitepackagesdir}/pylint/test/ {posargs:}
|
2016-04-26 13:53:30 +00:00
|
|
|
|
|
|
|
; Transform absolute path to relative path
|
|
|
|
; for compatibility with coveralls.io and fix 'source not available' error.
|
|
|
|
; If you can find a cleaner way is welcome
|
|
|
|
python -c "import os;cov_strip_abspath = open(os.environ['COVERAGE_FILE'], 'r').read().replace('.tox' + os.sep + os.path.relpath('{envsitepackagesdir}', '{toxworkdir}') + os.sep, '');open(os.environ['COVERAGE_FILE'], 'w').write(cov_strip_abspath)"
|
2015-11-07 16:09:00 +00:00
|
|
|
changedir = {toxworkdir}
|
2016-04-26 13:53:30 +00:00
|
|
|
|
2018-09-29 08:30:45 +00:00
|
|
|
|
|
|
|
[testenv:spelling]
|
|
|
|
deps =
|
|
|
|
https://github.com/PyCQA/astroid/tarball/master#egg=astroid-master-2.0
|
|
|
|
pytest
|
|
|
|
pytest-xdist
|
|
|
|
pyenchant
|
|
|
|
|
|
|
|
commands =
|
|
|
|
python -Wi -m pytest {envsitepackagesdir}/pylint/test/ {posargs:} -k unittest_checker_spelling
|
|
|
|
|
|
|
|
changedir = {toxworkdir}
|
|
|
|
|
2016-04-26 13:53:30 +00:00
|
|
|
[testenv:coveralls]
|
|
|
|
setenv =
|
|
|
|
COVERAGE_FILE = {toxinidir}/.coverage
|
|
|
|
passenv =
|
|
|
|
*
|
|
|
|
deps =
|
|
|
|
coverage
|
|
|
|
coveralls
|
|
|
|
skip_install = true
|
|
|
|
commands =
|
|
|
|
python {envsitepackagesdir}/coverage combine
|
|
|
|
python {envsitepackagesdir}/coverage report --rcfile={toxinidir}/.coveragerc -m
|
|
|
|
- coveralls --rcfile={toxinidir}/.coveragerc
|
|
|
|
changedir = {toxinidir}
|
|
|
|
|
|
|
|
[testenv:coverage-erase]
|
|
|
|
setenv =
|
|
|
|
COVERAGE_FILE = {toxinidir}/.coverage
|
|
|
|
deps =
|
|
|
|
coverage
|
|
|
|
skip_install = true
|
|
|
|
commands =
|
|
|
|
python {envsitepackagesdir}/coverage erase
|
|
|
|
changedir = {toxinidir}
|
2018-06-04 17:35:34 +00:00
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
skipsdist = True
|
|
|
|
usedevelop = True
|
|
|
|
changedir = doc/
|
|
|
|
whitelist_externals = rm
|
|
|
|
deps =
|
|
|
|
sphinx
|
2018-06-05 02:22:28 +00:00
|
|
|
python-docs-theme
|
2018-06-04 17:35:34 +00:00
|
|
|
|
|
|
|
commands =
|
2018-06-05 15:18:24 +00:00
|
|
|
pip install python_docs_theme
|
2018-06-04 17:35:34 +00:00
|
|
|
rm -f features.rst
|
|
|
|
python ./exts/pylint_features.py
|
|
|
|
rm -f extensions.rst
|
|
|
|
python ./exts/pylint_extensions.py
|
2018-07-31 16:16:46 +00:00
|
|
|
sphinx-build -W -b html -d _build/doctrees . _build/html
|