Init the cooperative command-line interface
This commit is contained in:
89
tox.ini
Normal file
89
tox.ini
Normal file
@ -0,0 +1,89 @@
|
||||
[tox]
|
||||
envlist =
|
||||
{py36,py37,py38}
|
||||
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 = pytest test/ --cov={toxinidir}/autonomic/ --no-cov-on-fail {posargs}
|
||||
|
||||
[testenv:lint]
|
||||
description = lint the source
|
||||
skipdist = True
|
||||
deps = flake8
|
||||
commands = flake8 {posargs} autonomic/ test/
|
||||
|
||||
[testenv:sort]
|
||||
description = sort the source
|
||||
skipdist = True
|
||||
deps = isort
|
||||
commands = isort {posargs:-rc -c} -sp setup.cfg autonomic/ test/
|
||||
|
||||
[testenv:format]
|
||||
description = format the source
|
||||
skipdist = True
|
||||
basepython = python3.8
|
||||
deps = black
|
||||
commands = black {posargs:--check} autonomic/ test/
|
||||
|
||||
[testenv:type]
|
||||
description = type check the source
|
||||
basepython = python3.8
|
||||
skipdist = True
|
||||
deps = mypy
|
||||
commands = mypy autonomic/ test/
|
||||
|
||||
[testenv:docs]
|
||||
description = build the documentation
|
||||
skipdist = True
|
||||
deps =
|
||||
sphinx
|
||||
sphinx_rtd_theme
|
||||
commands = python -m setup build_sphinx
|
||||
|
||||
[testenv:docs-livereload]
|
||||
description = invoke sphinx-autobuild to build and reload the documentation
|
||||
commands = python -m sphinx_autobuild docs/source docs/build
|
||||
deps = sphinx-autobuild>=0.7.1,<1.0
|
||||
extras = docs
|
||||
|
||||
[testenv:changelog]
|
||||
description = draw up the new changelog
|
||||
skipdist = True
|
||||
passenv = VERSION
|
||||
deps = towncrier
|
||||
commands = towncrier --version={env:VERSION} {posargs}
|
||||
|
||||
[testenv:metadata-release]
|
||||
description = validate the package metadata
|
||||
deps = twine
|
||||
commands =
|
||||
rm -rf {toxworkdir}/dist
|
||||
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel
|
||||
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg
|
||||
twine check {toxworkdir}/dist/*
|
||||
whitelist_externals =
|
||||
rm
|
||||
|
||||
[testenv:release]
|
||||
description = make a release
|
||||
deps = {[testenv:metadata-release]deps}
|
||||
commands =
|
||||
rm -rf {toxworkdir}/dist
|
||||
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel
|
||||
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg
|
||||
twine upload {toxworkdir}/dist/*
|
||||
whitelist_externals =
|
||||
rm
|
||||
Reference in New Issue
Block a user