mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-09 14:40:53 +00:00
Splice in project template
I tried to merge it so that future updates from the template will be much easier. The template is hosted at: https://github.com/ethereum/ethereum-python-project-template
This commit is contained in:
52
tox.ini
52
tox.ini
@ -1,48 +1,58 @@
|
||||
# Reference: https://github.com/ethereum/py_ecc/blob/d0da74402210ea1503ef83b3c489d5b5eba7f7bf/tox.ini
|
||||
# Reference: https://github.com/ethereum/ethereum-python-project-template/blob/master/tox.ini
|
||||
|
||||
# TODO: consider py36 and pypy3 support
|
||||
[tox]
|
||||
envlist =
|
||||
py37-test
|
||||
py37-interop
|
||||
lint
|
||||
|
||||
[flake8]
|
||||
max-line-length = 100
|
||||
exclude = *_pb2*.py
|
||||
ignore = E203, W503
|
||||
max-complexity = 18
|
||||
select = B,C,E,F,W,T4,B9
|
||||
docs
|
||||
|
||||
[isort]
|
||||
combine_as_imports=True
|
||||
force_sort_within_sections=True
|
||||
known_third_party=pytest,p2pclient,pexpect
|
||||
multi_line_output=3
|
||||
include_trailing_comma=True
|
||||
force_grid_wrap=0
|
||||
use_parentheses=True
|
||||
known_third_party=hypothesis,pytest,p2pclient,pexpect
|
||||
known_first_party=<MODULE_NAME>
|
||||
line_length=88
|
||||
multi_line_output=3
|
||||
use_parentheses=True
|
||||
force_grid_wrap=0
|
||||
skip_glob=
|
||||
*_pb2*.py
|
||||
*.pyi
|
||||
|
||||
[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
|
||||
|
||||
[testenv]
|
||||
usedevelop=True
|
||||
commands =
|
||||
test: pytest {posargs:tests/}
|
||||
docs: make build-docs
|
||||
basepython =
|
||||
docs: python
|
||||
py37: python3.7
|
||||
extras =
|
||||
test
|
||||
docs: doc
|
||||
whitelist_externals = make
|
||||
deps =
|
||||
passenv = CI TRAVIS TRAVIS_*
|
||||
extras = test
|
||||
commands =
|
||||
test: pytest tests/
|
||||
basepython =
|
||||
py37: python3.7
|
||||
|
||||
[testenv:lint]
|
||||
basepython = python3
|
||||
extras = dev
|
||||
extras = lint
|
||||
commands =
|
||||
mypy -p libp2p -p examples --config-file {toxinidir}/mypy.ini
|
||||
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 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
|
||||
flake8 libp2p tests tests_interop examples setup.py
|
||||
|
||||
[testenv:py37-interop]
|
||||
deps =
|
||||
|
||||
Reference in New Issue
Block a user