-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a minimal tox configuration
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[tox] | ||
min_version = 4.4.0 | ||
envlist = | ||
format | ||
lint | ||
dependencies | ||
release-check | ||
|
||
[testenv:format] | ||
description = automatically reformat code | ||
skip_install = true | ||
deps = | ||
pre-commit | ||
commands = | ||
pre-commit run -a pyupgrade | ||
pre-commit run -a isort | ||
pre-commit run -a black | ||
|
||
[testenv:lint] | ||
description = run linters that will help improve the code style | ||
skip_install = true | ||
deps = | ||
pre-commit | ||
commands = | ||
pre-commit run -a | ||
|
||
[testenv:dependencies] | ||
description = check if the package defines all its dependencies | ||
skip_install = true | ||
deps = | ||
build | ||
z3c.dependencychecker==2.14.3 | ||
commands = | ||
python -m build --sdist | ||
dependencychecker | ||
|
||
[testenv:release-check] | ||
description = ensure that the distribution is ready to release | ||
skip_install = true | ||
deps = | ||
twine | ||
build | ||
towncrier | ||
|
||
commands = | ||
# fake version to not have to install the package | ||
# we build the change log as news entries might break | ||
# the README that is displayed on PyPI | ||
towncrier build --version=100.0.0 --yes | ||
python -m build --sdist | ||
twine check dist/* |