-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
77 lines (69 loc) · 2.37 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
[tox]
minversion = 3.20
isolated_build = True
skip_missing_interpreters = True
# this refers to [tool.poetry.extras.dev] in pyproject.toml
# you probably don't need this line because poetry will install them
# in the commands list
# extras = dev
# which Python version to use
envlist = py{310, 311, 312}, lint, typing, docs, cov
[gh-actions]
python =
3.10: py310, lint, typing, docs, cov
3.11: py311
3.12: py312
[testenv]
; envdir =
; py37: {toxworkdir}/py37
; py38, lint, typing, docs: {toxworkdir}/py38
; py39: {toxworkdir}/py39
# We must whitelist tools that are called before installing the package
# (Poetry is listed in [build-system], but that won't help because we call it directly.)
# Tools like pre-commit and flake8 will have the necessary version from dev-deps
allowlist_externals =
poetry
skipdist = True
# If you your project contains extras (as in [tool.poetry.extras]),
# then add an `all` dependency list containing all of the extras (except dev),
# and add `--extras all` to `poetry install -v` below.
# the - prefix means ignore nonzero exit codes
commands_pre =
poetry run python --version
poetry check
poetry install -v --extras "all"
commands =
poetry run pytest tests/
[testenv:cov]
commands =
poetry run pytest --cov-report term-missing --cov=authcaptureproxy --cov-report=xml:cov.xml tests/
[testenv:lint]
commands =
poetry run isort authcaptureproxy
poetry run black authcaptureproxy
poetry run pre-commit run check-toml
poetry run pre-commit run check-yaml
poetry run pre-commit run check-json
poetry run bandit -r authcaptureproxy
poetry run bandit -r tests --skip B101
poetry run flake8 authcaptureproxy
poetry run flake8 docs
poetry run flake8 --ignore=D100,D101,D102,D103,D104,S101,W503,E203,E225,E301,E302,E501,D107,D200,D205,D400,D403,D409,D410,D411,D212,W391,W293 tests
[testenv:typing]
commands =
poetry run mypy --show-error-codes authcaptureproxy
poetry run mypy --show-error-codes docs
poetry run mypy --show-error-codes tests
[testenv:docs]
commands =
poetry run sphinx-build -b html docs docs/html
[flake8]
max-line-length = 100
ignore = W503,E203,E225,E301,E302,E501,D107,D200,D205,D400,D403,D409,D410,D411,D212,W391,W293
doctests = true
exclude = .git
__pycache__/
build/
dist/
import-order-style = google
docstring-convention = google