-
Notifications
You must be signed in to change notification settings - Fork 152
/
tox.ini
103 lines (92 loc) · 2.81 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
[tox]
requires = tox>=4
toxworkdir=/tmp/.tensile-tox
labels =
precommit = format, lint, isort, unittest
prepr = format, lint, isort, unittest, ci, hostlibtest
static = format, lint, isort
[vars]
client_path = {envdir}/client/0_Build/client/tensile_client
options =
--verbose \
--basetemp={envtmpdir} \
--color=yes \
--numprocesses=4 \
--prebuilt-client={[vars]client_path}
[testenv]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
joblib
filelock
pytest>=7.2.0
pytest-xdist>=3.3.0
commands =
python3 -c 'raise Exception("Default tox commands are not supported, specify one with the `-e` option")'
[testenv:ci]
commands =
python3 ./Tensile/bin/Tensile {toxinidir}/Tensile/Configs/build_client.yaml {envdir}/client
py.test {toxinidir}/Tensile/Tests {[vars]options} {posargs:-m pre_checkin}
[testenv:unittest]
deps =
{[testenv]deps}
pytest-cov>=5.0.0
commands =
coverage erase
pytest {toxinidir}/Tensile/Tests {[vars]options} -m unit --cov-append --cov=Tensile --cov-report=term {posargs}
[testenv:hostlibtest]
deps =
invoke
commands =
invoke hostlibtest --clean --configure --build
[testenv:lint]
skip_install = true
deps =
-r{toxinidir}/requirements.txt
flake8
commands =
flake8 {toxinidir}/Tensile
[testenv:format]
skip_install = true
deps = black==24.4
commands =
black \
--line-length=100 \
{toxinidir}/docs/ \
{toxinidir}/Tensile/Parallel.py \
{toxinidir}/Tensile/TensileCreateLibrary.py \
{toxinidir}/Tensile/TensileCreateLib/ \
{toxinidir}/Tensile/Tests/unit/test_TensileCreateLibrary.py \
{toxinidir}/Tensile/Tests/unit/test_KernelFileContext.py \
{toxinidir}/Tensile/Tests/unit/test_AsmRegisterPool.py \
{posargs}
[testenv:docs]
skip_install = true
change_dir = {toxinidir}/docs
deps = -r docs/sphinx/requirements.txt
commands = python3 -m sphinx -T -b html -d _build/doctrees -D language=en -v . _build/html
[testenv:isort]
description = "Sorts import statements for less merge conflicts"
skip_install = true
deps = isort==5.13.2
commands =
isort \
--profile=black \
{toxinidir}/docs/ \
{toxinidir}/Tensile/Parallel.py \
{toxinidir}/Tensile/TensileCreateLibrary.py \
{toxinidir}/Tensile/TensileCreateLib/ \
{toxinidir}/Tensile/Tests/unit/test_TensileCreateLibrary.py \
{toxinidir}/Tensile/Tests/unit/test_KernelFileContext.py \
{toxinidir}/Tensile/Tests/unit/test_AsmRegisterPool.py \
{posargs}
[flake8]
exclude = .git,build*,dist,.cache,*~
per-file-ignores = Tensile/Utilities/ConditionalImports.py:F401
max-line-length = 132
ignore =
# All E class violations are errors reported by pycodestyle
E,
# All W class violations are warnings reported by pycodestyle
W
# This mostly just leaves pyflakes errors.