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
|
|
|
|
envlist = py{27,36,37,38},pep8,fmt-check
|
|
|
|
|
|
|
|
# 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]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
usedevelop = True
|
|
|
|
install_command = pip install {opts} {packages}
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2020-12-09 14:13:35 -05:00
|
|
|
-r{toxinidir}/dev-requirements.txt
|
2019-05-15 16:12:59 -04:00
|
|
|
commands =
|
2020-12-09 14:13:35 -05:00
|
|
|
# Use -bb to enable BytesWarnings as error to catch str/bytes misuse.
|
|
|
|
# Use -Werror to treat warnings as errors.
|
|
|
|
# {envpython} -bb -Werror -m pytest \
|
|
|
|
# --cov="{envsitepackagesdir}/aprsd" --cov-report=html --cov-report=term {posargs}
|
2020-12-12 15:53:06 -05:00
|
|
|
{envpython} -bb -m pytest {posargs}
|
2019-05-15 16:12:59 -04:00
|
|
|
|
2020-12-09 14:13:35 -05:00
|
|
|
[testenv:py27]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
usedevelop = True
|
|
|
|
install_command = pip install {opts} {packages}
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements-py2.txt
|
2019-05-15 16:12:59 -04:00
|
|
|
commands =
|
2020-12-09 14:13:35 -05:00
|
|
|
# Use -bb to enable BytesWarnings as error to catch str/bytes misuse.
|
|
|
|
# Use -Werror to treat warnings as errors.
|
|
|
|
# {envpython} -bb -Werror -m pytest \
|
|
|
|
# --cov="{envsitepackagesdir}/aprsd" --cov-report=html --cov-report=term {posargs}
|
|
|
|
{envpython} -bb -Werror -m pytest
|
2019-05-15 16:12:59 -04:00
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
commands = sphinx-build -b html docs/source docs/html
|
|
|
|
|
2020-12-09 14:13:35 -05:00
|
|
|
[testenv:pep8-27]
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements-py2.txt
|
|
|
|
commands =
|
|
|
|
flake8 {posargs} aprsd
|
|
|
|
|
2019-05-15 16:12:59 -04:00
|
|
|
[testenv:pep8]
|
|
|
|
commands =
|
2020-12-04 08:56:26 -05:00
|
|
|
flake8 {posargs} aprsd
|
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 =
|
|
|
|
flake8 aprsd
|
|
|
|
|
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
|
2020-12-09 14:13:35 -05:00
|
|
|
ignore = E713,E501,W503
|
|
|
|
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 =
|
|
|
|
2.7: py27, pep8-27
|
|
|
|
3.6: py36, pep8, fmt-check
|
|
|
|
3.7: py38, pep8, fmt-check
|
|
|
|
3.8: py38, pep8, fmt-check, type-check, docs
|
|
|
|
3.9: py39
|
|
|
|
|
|
|
|
[testenv:fmt]
|
|
|
|
# This will reformat your code to comply with pep8
|
|
|
|
# and standard formatting
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
-r{toxinidir}/dev-requirements.txt
|
|
|
|
commands =
|
|
|
|
isort .
|
|
|
|
black .
|
|
|
|
|
|
|
|
[testenv:fmt-check]
|
|
|
|
# Runs a check only on code formatting.
|
|
|
|
# you can fix imports by running isort standalone
|
|
|
|
# you can fix code formatting by running black standalone
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
-r{toxinidir}/dev-requirements.txt
|
|
|
|
commands =
|
|
|
|
isort --check-only .
|
|
|
|
black --check .
|
|
|
|
|
|
|
|
[testenv:type-check]
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/dev-requirements.txt
|
|
|
|
commands =
|
|
|
|
mypy aprsd
|