-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathtox.ini
105 lines (94 loc) · 2.41 KB
/
tox.ini
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[tox]
minversion = 2.9.0
skipdist = True
skip_missing_interpreters = true
envlist = pep8,py{310,311}
#requires = tox-pipenv
# pip==22.0.4
# pip-tools==5.4.0
# 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]
description = Run unit-testing
setenv =
_PYTEST_SETUP_SKIP_APRSD_DEP=1
PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
usedevelop = True
install_command = pip install {opts} {packages}
extras = tests
deps =
pytest-cov
pytest
commands =
pytest -v --cov-report term-missing --cov=aprsd {posargs}
coverage: coverage report -m
coverage: coverage xml
[testenv:docs]
skip_install = true
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.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]
deps =
flake8
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 =
ruff
commands =
ruff check aprsd tests
[flake8]
max-line-length = 99
show-source = True
ignore = E713,E501,W503,N818
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.9: py39, pep8, type-check, docs
3.10: py39, pep8, type-check, docs
3.11: py311, pep8, type-check, docs
[testenv:fmt]
# This will reformat your code to comply with pep8
# and standard formatting
skip_install = true
deps =
ruff
commands =
ruff format aprsd tests
[testenv:type-check]
skip_install = true
deps =
mypy
types-pytz
types-requests
types-tzlocal
commands =
mypy --ignore-missing-imports --install-types aprsd
[testenv:pre-commit]
skip_install = true
basepython = python3
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure