-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
145 lines (132 loc) · 3.17 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# https://tox.wiki/en/latest/config.html
[tox]
skipsdist = True
usedevelop = True
recreate = False
[testenv:ssort]
description=Sorts the source code
setenv =
{[testenv]setenv}
deps =
ssort==0.11.6
commands =
bash -x -c "env|grep TOX && ssort {toxinidir}/src"
[testenv]
allowlist_externals =
bash
pytest
ipython
deps =
-e .[testing]
install_command=
python -m pip install {packages}
setenv =
PYNCHON_TOX_RUNTIME=True
[testenv:shell]
description=Debugging shell for this project
commands =
python -m fleks shell
deps =
IPython
[testenv:type-check]
description=
Type checking for this project. Informational; this is not enforced yet
recreate = False
env_dir={toxinidir}/../.tox/{env_name}
deps=
-e .[typing]
commands =
bash -x -c "\
(mypy --install-types --non-interactive src/||true)"
[testenv:dtest]
description=Docs tests
setenv =
{[testenv]setenv}
TEST_SUITE=docs
deps=
{[testenv]deps}
commands =
bash -x -c "python -m doctest -oELLIPSIS README.md"
[testenv:utest]
description=Unit tests
setenv =
{[testenv]setenv}
TEST_SUITE=units
commands =
bash -x -c "env && pytest -s tests/units"
[testenv:stest]
description=Smoke tests
setenv =
{[testenv]setenv}
TEST_SUITE=smoke
commands =
bash -x -c "env && pytest -s tests/smoke"
[testenv:itest]
description=Integration tests
setenv =
{[testenv]setenv}
TEST_SUITE=integration
commands =
bash -x -c "env && pytest --exitfirst -s tests/integration"
[testenv:cst]
description = CST codegen
deps =
libcst==0.4.9
commands =
bash -x -c "\
python -m libcst.tool --version && \
python -m libcst.tool codemod \
remove_unused_imports.RemoveUnusedImportsCommand \
{toxinidir}/src || true; \
python -m libcst.tool codemod \
convert_format_to_fstring.ConvertFormatStringCommand \
{toxinidir}/src || true; \
python -m libcst.tool codemod \
convert_namedtuple_to_dataclass.ConvertNamedTupleToDataclassCommandpython3 -m libcst.tool codemod convert_namedtuple_to_dataclass.ConvertNamedTupleToDataclassCommand \
{toxinidir}/src || true;"
[testenv:normalize]
description = Normalizes code for this project
deps =
shed==2023.5.1
autopep8==1.7.0
isort==5.11.5
commands =
bash -x -c "\
pushd {toxinidir}/src; shed; popd; \
autopep8 --recursive --in-place {toxinidir}/src; \
isort --settings-file {toxinidir}/.isort.cfg {toxinidir}/src;"
bash -x -c "\
autopep8 --recursive --in-place {toxinidir}/tests; \
isort --settings-file {toxinidir}/.isort.cfg {toxinidir}/tests;"
[testenv:static-analysis]
description = Runs Flake8
skip_install = True
recreate = False
deps =
flake8==5.0.4
vulture==2.6
commands =
bash -x -c "\
flake8 --config {toxinidir}/.flake8 src \
&& vulture {toxinidir}/src --min-confidence 90 \
&& flake8 --config {toxinidir}/.flake8 tests \
&& vulture {toxinidir}/tests --min-confidence 90 \
"
[testenv:docs-plan]
description=Plan docs changes
deps =
{[testenv]deps}
pynchon
setenv =
{[testenv]setenv}
commands =
bash -x -c "env|grep TOX && pynchon plan"
[testenv:docs]
description=Apply docs changes per plan
setenv =
{[testenv]setenv}
deps =
{[testenv]deps}
pynchon
commands =
bash -x -c "env|grep TOX && pynchon plan"