-
Notifications
You must be signed in to change notification settings - Fork 443
/
tox.ini
120 lines (103 loc) · 3.52 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
[tox]
isolated_build = true
skip_missing_interpreters = true
[pytest]
addopts = --csv=.tox/tests-{env:TOXENV_TASK}-{env:TOXENV_PYVER}.csv
[testenv]
setenv =
TOX_WORK_DIR={toxworkdir}
task =
all: "all"
action: "action"
classification: "classification"
multi_cls_classification: "multi_cls_classification"
multi_label_classification: "multi_label_classification"
hlabel_classification: "hlabel_classification"
detection: "detection"
rotated_detection: "rotated_detection"
keypoint_detection: "keypoint_detection"
instance_segmentation: "instance_segmentation"
semantic_segmentation: "semantic_segmentation"
visual_prompting_all: "visual_prompting_all"
visual_prompting: "visual_prompting"
zero_shot_visual_prompting: "visual_prompting"
anomaly: "anomaly"
anomaly_classification: "anomaly_classification"
anomaly_detection: "anomaly_detection"
anomaly_segmentation: "anomaly_segmentation"
object_detection_3d: "object_detection_3d"
passenv =
ftp_proxy
HTTP_PROXY
HTTPS_PROXY
CUDA_VISIBLE_DEVICES
CI_DATA_ROOT
[testenv:pre-commit]
deps =
pre-commit==2.20.0
skip_install = true
commands =
pre-commit run --all-files
[testenv:unit-test-{py310, py311}]
deps =
.[base,dev]
commands =
; Run Unit-Test with coverage report.
pytest tests/unit \
--cov=otx \
--cov-report=xml:{toxworkdir}/coverage_{envname}.xml \
--cov-report=term-missing \
--cov-fail-under=0 \
{posargs}
[testenv:integration-test-{all, action, classification, multi_cls_classification, multi_label_classification, hlabel_classification, detection, rotated_detection, keypoint_detection, instance_segmentation, semantic_segmentation, visual_prompting_all, visual_prompting, zero_shot_visual_prompting, anomaly, anomaly_classification, anomaly_detection, anomaly_segmentation, object_detection_3d}]
setenv =
CUBLAS_WORKSPACE_CONFIG=:4096:8
deps =
.[base,dev]
commands =
python -m pytest tests/integration -ra --showlocals --csv={toxworkdir}/{envname}.csv --task {[testenv]task} --open-subprocess {posargs}
[testenv:e2e-test-{all, action, classification, detection, rotated_detection, keypoint_detection, instance_segmentation, semantic_segmentation, visual_prompting, anomaly, object_detection_3d}]
setenv =
CUBLAS_WORKSPACE_CONFIG=:4096:8
deps =
.[base,dev]
commands =
python -m pytest tests/e2e -ra --showlocals --csv={toxworkdir}/{envname}.csv --task {[testenv]task} --open-subprocess {posargs}
[testenv:perf-benchmark]
deps =
.[base,dev,ci_benchmark]
commands =
pytest -ra --showlocals --csv={toxworkdir}/{envname}-test.csv {posargs:tests/perf}
[testenv:build-doc]
deps =
{[testenv:unit-test-py310]deps}
.[base,docs]
change_dir = {toxinidir}/docs
allowlist_externals =
make
commands =
make html
[testenv:bandit-scan]
skip_install = true
deps =
bandit
allowlist_externals =
bandit
commands =
- bandit -r -c .ci/ipas_default.config {toxinidir}/ -f txt -o {toxworkdir}/bandit-report.txt
[testenv:fuzzing]
deps =
.[base,dev]
atheris
coverage
extras = full
commands_pre =
; [TODO]: Needs to be fixed so that this is not duplicated for each test run
otx install -v
allowlist_externals =
/bin/bash
commands =
coverage erase
coverage run tests/fuzzing/cli_fuzzing.py {posargs:-artifact_prefix={toxworkdir}/ -jobs=8 -print_final_stats=1 -runs=62500 -dict={toxinidir}/tests/fuzzing/assets/cli/commands.dict}
coverage report --precision=2
/bin/bash -c 'rm {toxinidir}/fuzz-*.log'