2019-07-08 09:40:40 +00:00
|
|
|
[tox]
|
|
|
|
envlist =
|
|
|
|
{py36,py37}-test
|
|
|
|
lint
|
|
|
|
sort
|
|
|
|
format
|
|
|
|
type
|
|
|
|
docs
|
|
|
|
changelog
|
|
|
|
metadata-release
|
|
|
|
skip_missing_interpreters = True
|
|
|
|
isolated_build = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
description = run the unit tests
|
|
|
|
deps =
|
|
|
|
pytest
|
|
|
|
pytest-cov
|
|
|
|
pytest-mock
|
|
|
|
commands =
|
2019-07-08 11:04:00 +00:00
|
|
|
pytest test/ --cov={toxinidir}/merkle_tree_stream/ --no-cov-on-fail {posargs}
|
2019-07-08 09:40:40 +00:00
|
|
|
|
|
|
|
[testenv:lint]
|
|
|
|
description = lint the source
|
|
|
|
skipdist = True
|
|
|
|
deps =
|
|
|
|
flake8
|
|
|
|
commands =
|
2019-07-08 11:04:00 +00:00
|
|
|
flake8 {posargs} merkle_tree_stream/ test/
|
2019-07-08 09:40:40 +00:00
|
|
|
|
|
|
|
[testenv:sort]
|
|
|
|
description = sort the source
|
|
|
|
skipdist = True
|
|
|
|
deps =
|
|
|
|
isort
|
|
|
|
commands =
|
2019-07-08 11:04:00 +00:00
|
|
|
isort {posargs:-rc -c} -sp setup.cfg merkle_tree_stream/ test/
|
2019-07-08 09:40:40 +00:00
|
|
|
|
|
|
|
[testenv:format]
|
|
|
|
description = format the source
|
|
|
|
skipdist = True
|
|
|
|
basepython = python3.6
|
|
|
|
deps =
|
|
|
|
black
|
|
|
|
commands =
|
2019-07-08 11:04:00 +00:00
|
|
|
black {posargs:--check} merkle_tree_stream/ test/
|
2019-07-08 09:40:40 +00:00
|
|
|
|
|
|
|
[testenv:type]
|
|
|
|
description = type check the source
|
|
|
|
basepython = python3.7
|
|
|
|
skipdist = True
|
|
|
|
deps =
|
|
|
|
mypy
|
|
|
|
commands =
|
2019-07-08 11:04:00 +00:00
|
|
|
mypy merkle_tree_stream/ test/
|
2019-07-08 09:40:40 +00:00
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
description = build the documentation
|
|
|
|
skipdist = True
|
|
|
|
deps =
|
|
|
|
sphinx
|
|
|
|
commands =
|
|
|
|
python -m setup build_sphinx
|
|
|
|
|
|
|
|
[testenv:changelog]
|
|
|
|
description = draft the changelog
|
|
|
|
skipdist = True
|
|
|
|
deps =
|
|
|
|
towncrier
|
|
|
|
commands =
|
|
|
|
towncrier --draft
|
|
|
|
|
|
|
|
[testenv:metadata-release]
|
|
|
|
description = validate the package metadata
|
|
|
|
deps =
|
|
|
|
twine
|
|
|
|
commands =
|
|
|
|
twine check .tox/dist/*
|
|
|
|
|
|
|
|
[testenv:release]
|
|
|
|
description = make a release
|
|
|
|
deps =
|
|
|
|
{[testenv:metadata-release]deps}
|
|
|
|
commands =
|
|
|
|
python -m setup sdist bdist_wheel
|
|
|
|
twine upload {toxworkdir}/dist/*
|