forked from plone/plone.dexterity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
64 lines (59 loc) · 1.63 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
[tox]
envlist =
format
lint
[testenv]
py_files = git ls-files "*.py"
text_files = git ls-files "*.rst" "*.md"
xml_files = git ls-files "*.xml"
zcml_files = git ls-files "*.zcml"
allowlist_externals =
sh
[testenv:format]
description = automatically reformat python code
skip_install = true
deps =
pyupgrade
isort
black
zpretty
-c lint-requirements.txt
commands =
sh -c '{[testenv]py_files} | xargs pyupgrade --py38-plus'
sh -c '{[testenv]py_files} | xargs isort'
sh -c '{[testenv]py_files} | xargs black'
sh -c '{[testenv]xml_files} | xargs zpretty -x -i'
sh -c '{[testenv]zcml_files} | xargs zpretty -z -i'
[testenv:lint]
description = run linters that will help improve the code style
skip_install = true
deps =
flake8
codespell
tomli # needed for codespell to read pyproject.toml
check-manifest
pyroma
-c lint-requirements.txt
commands =
sh -c '{[testenv]py_files} | xargs flake8'
sh -c '{[testenv]py_files} | xargs codespell'
sh -c '{[testenv]text_files} | xargs codespell'
check-manifest
pyroma -n 10 .
[testenv:dependencies]
description = check if the package defines all its dependencies
deps =
z3c.dependencychecker
-c lint-requirements.txt
commands =
dependencychecker
[testenv:dependencies-graph]
description = generate a graph with the distribution dependencies
deps =
pipdeptree
graphviz # optional dependency of pipdeptree
-c lint-requirements.txt
commands =
sh -c 'pipdeptree --exclude setuptools,pipdeptree,wheel --graph-output svg > dependencies.svg'