-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
78 lines (68 loc) · 1.62 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
[tox]
requires =
tox
env_list =
type
lint
format
security
docs
py310,py311,py312
[testenv]
description = General unit testing environment.
setenv =
COVERAGE_OMIT = */tests/*,*/__init__.py
deps =
coverage
commands =
coverage run --branch --omit {env:COVERAGE_OMIT} -m unittest discover -s fakernaija/tests
[testenv:py310]
description = Test with Python 3.10
basepython = python3.10
[testenv:py311]
description = Test with Python 3.11
basepython = python3.11
[testenv:py312]
description = Test with Python 3.12
basepython = python3.12
commands =
coverage erase
coverage run --branch --omit {env:COVERAGE_OMIT} -m unittest discover -s fakernaija/tests
coverage report --omit {env:COVERAGE_OMIT} --fail-under=80
coverage html --omit {env:COVERAGE_OMIT}
[testenv:type]
description = Run type checks with mypy.
deps =
mypy
commands =
mypy {posargs:fakernaija}
[testenv:lint]
description = Check for linting issues using Ruff.
deps =
ruff
commands =
ruff check --exclude=docs/* --select I
[testenv:format]
description = Format code using Ruff built-in formatter.
deps =
ruff
commands =
ruff format
[testenv:security]
description = Run security checks using Bandit.
deps =
bandit
commands =
# B311: Allow pseudo-random generators
bandit --skip B311 -r fakernaija
[testenv:docs]
description = Build the HTML documentation using Sphinx.
deps =
-rdocs/requirements.txt
commands =
sphinx-build -M html docs/source/ docs/build/
sphinx-build -b epub -c docs/source docs/source build/epub
[flake8]
extend-ignore =
# Ignore checking line length
E501