aboutsummaryrefslogtreecommitdiff
path: root/tox.ini
blob: b2f5cfcfdcad8b29bf1743e8478ad22b69f3b55a (plain)
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
# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
[tox]
envlist = test

[testenv:test]
description = Run the unit tests.
deps =
    pytest==7.1.1
commands =
    pytest {posargs:tests/}

[testenv:coverage]
description = Run the code coverage of the unit tests.
deps =
    {[testenv:test]deps}
    pytest-cov==3.0.0

commands =
    pytest --cov=mlia --cov-report term-missing --cov-fail-under=95 tests/

[testenv:lint]
description = Run the pre-commit hooks.
usedevelop = True
extras =
    dev
# Workaround to resolve an issue with markdownlint in a docker environment
passenv = HOME
commands =
    pre-commit run --all-files --hook-stage=push {posargs}

[testenv:build]
description = Build a wheel file (platform name as optional argument [manylinux2014_aarch64, manylinux2014_x86_64]).
deps =
    build
commands =
    python -m build --wheel --config-setting=--build-option=--plat-name={posargs:manylinux2014_x86_64}

[testenv:docs]
description = Create the documentation.
allowlist_externals = make
usedevelop = True
deps =
    Sphinx==4.5.0
    sphinx-rtd-theme==1.0.0
commands =
    sphinx-apidoc -f -o docs/source src/mlia
    make --directory docs html