forked from microsoft/opentelemetry-distro-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
67 lines (61 loc) · 2.16 KB
/
Copy pathtox.ini
File metadata and controls
67 lines (61 loc) · 2.16 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
[tox]
requires =
tox>=4.4.10
# agent-framework-azure-ai supports 310-314
envlist = pylint,mypy,black,pytest-py{310,311,312,313,314}
[testenv]
skip_install = true
skipsdist = true
usedevelop = false
deps =
-r {tox_root}/dev_requirements.txt
install_command = python -m pip install {opts} {packages}
[testenv:mypy]
description = Typecheck the package with mypy (version {[testenv:mypy]mypy_version})
mypy_version = 1.18.1
deps =
{[testenv]deps}
mypy=={[testenv:mypy]mypy_version}
commands =
python -m pip install -e {tox_root}
python -m mypy --python-version 3.10 --show-error-codes --ignore-missing-imports {tox_root}/src
python -m mypy --python-version 3.10 --show-error-codes --ignore-missing-imports --check-untyped-defs --follow-imports=silent {tox_root}/tests {tox_root}/samples
[testenv:pylint]
description = Lint the package with pylint (version {[testenv:pylint]pylint_version})
pylint_version = 3.2.7
deps =
{[testenv]deps}
pylint=={[testenv:pylint]pylint_version}
commands =
python -m pip install -e {tox_root}
python -m pylint --output-format=parseable {tox_root}/src
python -m pylint --output-format=parseable --disable=protected-access,too-many-public-methods,too-many-lines {tox_root}/tests
python -m pylint --output-format=parseable --disable=import-error {tox_root}/samples
[testenv:black]
description = Format code with black
deps =
black>=24.0
commands =
python -m black {tox_root}/src {tox_root}/tests {tox_root}/samples
[testenv:docs]
description = Build Sphinx documentation
deps =
{[testenv]deps}
commands =
python -m pip install -e {tox_root}[docs]
python -m sphinx.ext.apidoc -o {tox_root}/docs/api {tox_root}/src/microsoft --force --module-first --separate
python -m sphinx -b html {tox_root}/docs {tox_root}/docs/_build/html
[testenv:pytest-py{310,311,312,313,314}]
description = Run tests with pytest on Python {base_python}
base_python =
py310: python3.10
py311: python3.11
py312: python3.12
py313: python3.13
py314: python3.14
deps =
{[testenv]deps}
pytest>=8.0
commands =
python -m pip install -e {tox_root}
python -m pytest --cov --cov-report=term-missing {tox_root}/tests {posargs}