mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-08 17:46:09 -05:00
Hemna
8b5f21eece
This patch is a rebase of master after the introduction of switching from black to gray code formatting.
105 lines
2.5 KiB
INI
105 lines
2.5 KiB
INI
[tox]
|
|
minversion = 2.9.0
|
|
skipdist = True
|
|
skip_missing_interpreters = true
|
|
envlist = pre-commit,pep8,py{36,37,38}
|
|
|
|
# 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
|
|
|
|
[testenv]
|
|
setenv = _PYTEST_SETUP_SKIP_APRSD_DEP=1
|
|
coverage: _APRSD_TOX_CMD=coverage run -m pytest
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
extras = tests
|
|
deps = coverage: coverage
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/dev-requirements.txt
|
|
pytestmain: git+https://github.com/pytest-dev/pytest.git@main
|
|
commands =
|
|
{env:_APRSD_TOX_CMD:pytest} {posargs}
|
|
coverage: coverage report -m
|
|
coverage: coverage xml
|
|
|
|
[pytest]
|
|
minversion=2.0
|
|
testpaths = tests
|
|
#--pyargs --doctest-modules --ignore=.tox
|
|
addopts=-r a
|
|
filterwarnings =
|
|
error
|
|
|
|
[testenv:docs]
|
|
skip_install = true
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/dev-requirements.txt
|
|
{toxinidir}/.
|
|
changedir = {toxinidir}/docs
|
|
commands =
|
|
{envpython} clean_docs.py
|
|
sphinx-apidoc --force --output-dir apidoc {toxinidir}/aprsd
|
|
sphinx-build -a -W . _build
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs} aprsd tests
|
|
|
|
[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
|
|
|
|
[testenv:lint]
|
|
skip_install = true
|
|
deps =
|
|
-r{toxinidir}/dev-requirements.txt
|
|
commands =
|
|
flake8 aprsd tests
|
|
|
|
[flake8]
|
|
max-line-length = 99
|
|
show-source = True
|
|
ignore = E713,E501,W503
|
|
extend-ignore = E203,W503
|
|
extend-exclude = venv
|
|
exclude = .venv,.git,.tox,dist,doc,.ropeproject
|
|
|
|
# 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 =
|
|
3.6: py36, pep8
|
|
3.7: py38, pep8
|
|
3.8: py38, pep8, 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 =
|
|
gray aprsd tests
|
|
|
|
[testenv:type-check]
|
|
skip_install = true
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/dev-requirements.txt
|
|
commands =
|
|
mypy aprsd
|
|
|
|
[testenv:pre-commit]
|
|
skip_install = true
|
|
basepython = python3
|
|
deps = pre-commit
|
|
commands = pre-commit run --all-files --show-diff-on-failure
|