forked from NVIDIA/Model-Optimizer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
52 lines (45 loc) · 1.31 KB
/
tox.ini
File metadata and controls
52 lines (45 loc) · 1.31 KB
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
[tox]
envlist=
pre-commit-all
py312-torch27-unit
skipsdist = True
toxworkdir = /tmp/{env:USER}-modelopt-tox
############################
# CPU Unit test environments
############################
[testenv:{py39,py310,py311,py312}-torch{24,25,26,27}-unit]
deps =
# torch version auto-selected based on torchvision version
torch24: torchvision~=0.19.0
torch25: torchvision~=0.20.0
torch26: torchvision~=0.21.0
torch27: torchvision~=0.22.0
-e .[all,dev-test]
commands =
python -m pytest tests/unit --cov
#############################################
# Code quality checks on all files or on diff
#############################################
[testenv:{pre-commit}-{all,diff}]
deps =
-e .[all,dev-lint]
commands =
all: pre-commit run --all-files --show-diff-on-failure {posargs}
diff: pre-commit run --from-ref origin/main --to-ref HEAD {posargs}
#####################
# Documentation build
#####################
[testenv:{build,debug}-docs]
allowlist_externals =
rm
passenv =
SETUPTOOLS_SCM_PRETEND_VERSION
deps =
-e .[all,dev-docs]
changedir = docs
commands_pre =
rm -rf build
rm -rf source/reference/generated
commands =
sphinx-build source build/html --fail-on-warning --show-traceback --keep-going
debug: sphinx-autobuild source build/html --host 0.0.0.0