py-libp2p/tox.ini

68 lines
1.5 KiB
INI
Raw Normal View History

# Reference: https://github.com/ethereum/ethereum-python-project-template/blob/master/tox.ini
2019-12-03 08:00:56 +08:00
# TODO: consider pypy3 support
[tox]
envlist =
2019-12-11 09:07:21 +08:00
py{36,37}-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=anyio,factory,p2pclient,pytest
2019-11-27 04:44:17 +08:00
known_first_party=libp2p
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
2019-12-03 08:00:56 +08:00
py36: python3.6
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