py-libp2p/tox.ini

67 lines
1.5 KiB
INI
Raw Normal View History

# Reference: https://github.com/ethereum/ethereum-python-project-template/blob/master/tox.ini
# TODO: consider py36 and pypy3 support
[tox]
envlist =
py37-test
2019-08-28 23:39:33 +08:00
py37-interop
lint
docs
2019-08-03 05:38:03 +08:00
2019-08-03 13:29:21 +08:00
[isort]
combine_as_imports=False
2019-08-03 13:29:21 +08:00
force_sort_within_sections=True
include_trailing_comma=True
known_third_party=hypothesis,pytest,p2pclient,pexpect,factory
2018-01-25 08:00:28 +08:00
known_first_party=<MODULE_NAME>
line_length=88
2018-01-25 08:00:28 +08:00
multi_line_output=3
use_parentheses=True
force_grid_wrap=0
skip_glob=
*_pb2*.py
*.pyi
2019-08-03 13:29:21 +08:00
2018-01-25 08:00:28 +08:00
[flake8]
max-line-length = 100
exclude = venv*,.tox,docs,build,*_pb2*.py
ignore = E203, W503
max-complexity = 18
select = B,C,E,F,W,T4,B9
2018-01-25 08:00:28 +08:00
[testenv]
2018-01-25 08:00:28 +08:00
usedevelop=True
commands =
test: pytest {posargs:tests/}
docs: make build-docs
basepython =
docs: python
py37: python3.7
extras =
2018-02-08 03:14:11 +08:00
test
docs: doc
whitelist_externals = make
deps =
passenv = CI TRAVIS TRAVIS_*
[testenv:lint]
basepython = python3
extras = lint
commands =
mypy -p {toxinidir}/libp2p -p examples --config-file {toxinidir}/mypy.ini
flake8 {toxinidir}/libp2p {toxinidir}/tests tests_interop examples setup.py
black --check libp2p tests tests_interop examples setup.py
isort --recursive --check-only --diff {toxinidir}/libp2p {toxinidir}/tests tests_interop examples setup.py
docformatter --pre-summary-newline --check --recursive libp2p tests tests_interop examples setup.py
[testenv:py37-interop]
deps =
p2pclient
pexpect
passenv = CI TRAVIS TRAVIS_* GOPATH
extras = test
commands =
pytest tests_interop/
basepython =
py37: python3.7