2019-05-15 16:12:59 -04:00
|
|
|
[tox]
|
2020-12-09 14:13:35 -05:00
|
|
|
minversion = 2.9.0
|
2019-05-15 16:12:59 -04:00
|
|
|
skipdist = True
|
2020-12-09 14:13:35 -05:00
|
|
|
skip_missing_interpreters = true
|
2022-12-15 17:23:54 -05:00
|
|
|
envlist = pep8,py{39,310}
|
2022-11-22 13:32:19 -05:00
|
|
|
#requires = tox-pipenv
|
|
|
|
# pip==22.0.4
|
|
|
|
# pip-tools==5.4.0
|
2020-12-09 14:13:35 -05:00
|
|
|
|
|
|
|
# Activate isolated build environment. tox will use a virtual environment
|
|
|
|
# to build a source distribution from the source tree. For build tools and
|
|
|
|
# arguments use the pyproject.toml file as specified in PEP-517 and PEP-518.
|
|
|
|
isolated_build = true
|
2019-05-15 16:12:59 -04:00
|
|
|
|
|
|
|
[testenv]
|
2021-12-07 11:57:01 -05:00
|
|
|
description = Run unit-testing
|
|
|
|
setenv =
|
|
|
|
_PYTEST_SETUP_SKIP_APRSD_DEP=1
|
|
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
|
|
PYTHONUNBUFFERED=1
|
2019-05-15 16:12:59 -04:00
|
|
|
usedevelop = True
|
|
|
|
install_command = pip install {opts} {packages}
|
2021-08-19 19:23:12 -04:00
|
|
|
extras = tests
|
|
|
|
deps = coverage: coverage
|
|
|
|
-r{toxinidir}/requirements.txt
|
2020-12-09 14:13:35 -05:00
|
|
|
-r{toxinidir}/dev-requirements.txt
|
2021-08-19 19:23:12 -04:00
|
|
|
pytestmain: git+https://github.com/pytest-dev/pytest.git@main
|
2019-05-15 16:12:59 -04:00
|
|
|
commands =
|
2021-12-07 11:57:01 -05:00
|
|
|
pytest -v --cov-report term-missing --cov=aprsd {posargs}
|
2021-08-19 19:23:12 -04:00
|
|
|
coverage: coverage report -m
|
|
|
|
coverage: coverage xml
|
|
|
|
|
2019-05-15 16:12:59 -04:00
|
|
|
[testenv:docs]
|
2021-01-09 14:12:13 -05:00
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/dev-requirements.txt
|
2021-01-09 19:36:09 -05:00
|
|
|
{toxinidir}/.
|
2021-01-09 14:12:13 -05:00
|
|
|
changedir = {toxinidir}/docs
|
|
|
|
commands =
|
|
|
|
{envpython} clean_docs.py
|
|
|
|
sphinx-apidoc --force --output-dir apidoc {toxinidir}/aprsd
|
|
|
|
sphinx-build -a -W . _build
|
2019-05-15 16:12:59 -04:00
|
|
|
|
|
|
|
[testenv:pep8]
|
|
|
|
commands =
|
2021-01-06 17:50:02 -05:00
|
|
|
flake8 {posargs} aprsd tests
|
2019-05-15 16:12:59 -04:00
|
|
|
|
|
|
|
[testenv:fast8]
|
|
|
|
basepython = python3
|
|
|
|
# Use same environment directory as pep8 env to save space and install time
|
|
|
|
envdir = {toxworkdir}/pep8
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/fast8.sh
|
|
|
|
passenv = FAST8_NUM_COMMITS
|
|
|
|
|
2020-12-09 14:13:35 -05:00
|
|
|
[testenv:lint]
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
-r{toxinidir}/dev-requirements.txt
|
|
|
|
commands =
|
2021-01-06 17:50:02 -05:00
|
|
|
flake8 aprsd tests
|
2020-12-09 14:13:35 -05:00
|
|
|
|
2019-05-15 16:12:59 -04:00
|
|
|
[flake8]
|
2020-12-09 14:13:35 -05:00
|
|
|
max-line-length = 99
|
2019-05-15 16:12:59 -04:00
|
|
|
show-source = True
|
2022-02-21 16:04:33 -05:00
|
|
|
ignore = E713,E501,W503,N818
|
2020-12-09 14:13:35 -05:00
|
|
|
extend-ignore = E203,W503
|
|
|
|
extend-exclude = venv
|
2019-05-15 16:12:59 -04:00
|
|
|
exclude = .venv,.git,.tox,dist,doc,.ropeproject
|
2020-12-09 14:13:35 -05:00
|
|
|
|
|
|
|
# This is the configuration for the tox-gh-actions plugin for GitHub Actions
|
|
|
|
# https://github.com/ymyzk/tox-gh-actions
|
|
|
|
# This section is not needed if not using GitHub Actions for CI.
|
|
|
|
[gh-actions]
|
|
|
|
python =
|
2021-08-23 12:14:19 -04:00
|
|
|
3.6: py36, pep8
|
|
|
|
3.7: py38, pep8
|
2021-12-07 11:35:18 -05:00
|
|
|
3.8: py38, pep8
|
|
|
|
3.9: py39, pep8, type-check, docs
|
2020-12-09 14:13:35 -05:00
|
|
|
|
|
|
|
[testenv:fmt]
|
|
|
|
# This will reformat your code to comply with pep8
|
|
|
|
# and standard formatting
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
-r{toxinidir}/dev-requirements.txt
|
|
|
|
commands =
|
2021-08-23 12:14:19 -04:00
|
|
|
gray aprsd tests
|
2020-12-09 14:13:35 -05:00
|
|
|
|
|
|
|
[testenv:type-check]
|
|
|
|
skip_install = true
|
2021-08-19 19:23:12 -04:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
2020-12-09 14:13:35 -05:00
|
|
|
-r{toxinidir}/dev-requirements.txt
|
|
|
|
commands =
|
|
|
|
mypy aprsd
|
2021-01-07 17:00:42 -05:00
|
|
|
|
|
|
|
[testenv:pre-commit]
|
|
|
|
skip_install = true
|
2021-08-19 19:23:12 -04:00
|
|
|
basepython = python3
|
2021-01-07 17:00:42 -05:00
|
|
|
deps = pre-commit
|
|
|
|
commands = pre-commit run --all-files --show-diff-on-failure
|