# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates. # SPDX-License-Identifier: Apache-2.0 [tox] envlist = test isolated_build = true [testenv:test] description = Run the unit tests. deps = pytest==7.2.0 commands = pytest {posargs:tests/} [testenv:coverage] description = Run the code coverage of the unit tests. deps = {[testenv:test]deps} pytest-cov==4.0.0 commands = pytest --cov=mlia --cov-report term-missing --cov-fail-under=95 tests/ [testenv:{lint,lint_setup}] description = Run and setup the pre-commit hooks. # Re-use the same env for both lint and lint_setup envdir={toxworkdir}/lint extras = dev # Pass the following environment variables: # - HOME: Workaround for an issue with markdownlint in a docker environment # - SKIP: Allows skipping of pre-commit hooks, e.g. "SKIP=reuse tox -e lint" passenv = HOME SKIP commands = lint_setup: pre-commit install-hooks lint: 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 deps = Sphinx==4.5.0 sphinx-rtd-theme==1.0.0 commands = sphinx-apidoc -f -o docs/source src/mlia make --directory docs html