forked from ouster-lidar/ouster-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
75 lines (68 loc) · 2.32 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
[tox]
envlist = py{37,38,39,310}
isolated_build = true
skip_missing_interpreters = true
[testenv]
extras = test
allowlist_externals = mkdir
passenv = ARTIFACT_DIR, ID, VERSION_ID
setenv =
ARTIFACT_DIR = {env:ARTIFACT_DIR:./artifacts}
ID = {env:ID:none}
VERSION_ID = {env:VERSION_ID:none}
commands =
pytest tests/ -o junit_suite_name="ouster-sdk-{env:ID}-{env:VERSION_ID}-{envname}" \
--junit-prefix="{env:ID}__{env:VERSION_ID}__{envname}" \
--junitxml="{env:ARTIFACT_DIR}/tox-tests/ouster-sdk-{env:ID}-{env:VERSION_ID}-{envname}.xml"
[testenv:py{37,38,39,310}-use_wheels]
description = installs ouster-sdk-python from wheels and runs tests
passenv = WHEELS_DIR
skipsdist = true
skip_install = true
commands =
pip install --force-reinstall --upgrade --pre -f {env:WHEELS_DIR} --no-index ouster-sdk[test]
pytest tests/ -o junit_suite_name="ouster-sdk-{env:ID}-{env:VERSION_ID}-{envname}" \
--junit-prefix="{env:ID}__{env:VERSION_ID}__{envname}" \
--junitxml="{env:ARTIFACT_DIR}/tox-tests/ouster-sdk-{env:ID}-{env:VERSION_ID}-{envname}.xml"
[testenv:docs]
description = generating Ouster SDK documentaion html page (sphinx based)
extras = docs
commands =
sphinx-build --color -b html -d "{toxworkdir}/docs_doctree" "{toxinidir}/../docs" "{env:ARTIFACT_DIR}/docs" {posargs}
[testenv:flake]
description = checking style with flake8
skip_install = true
deps =
flake8
flake8_formatter_junit_xml
commands =
mkdir -p {env:ARTIFACT_DIR}/lint
flake8 --format=junit-xml --output-file={env:ARTIFACT_DIR}/lint/flake.xml ./src ./tests
[testenv:mypy]
description = check types with mypy
deps = mypy
commands =
mypy --junit-xml {env:ARTIFACT_DIR}/lint/mypy.xml ./src ./tests
[flake8]
max-line-length = 120
per-file-ignores =
tests/*: D
docs/*: D
ignore =
# E125, E126, E128 continuation line indentation, yapf doesn't fix this
E125,
E126,
E128,
# E251 newlines around equals in keywords, yapf again
E251,
# E731 assigning a lambda expression
E731,
# W503 line break before binary operator, yapf again
W503,
# W504 line break before binary operator, yapf again
W504,
# E741 "l" and "I" as variables names; not a problem with some static analysis
E741
[pydocstyle]
# used by flake8-docstrings plugin in flake env
convention = google