-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
139 lines (122 loc) · 3.19 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
[tox]
isolated_build = True
envlist = bandit, check-copyright, black-check, vulture, mypy, py3{9,10,11,12}, docs
[tox:.package]
# note tox will use the same python version as under what tox is installed to package
# so unless this is python 3 you can require a given python version for the packaging
# environment via the basepython key
basepython = python3
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
pytest==7.4.2
pytest-cov==4.1.0
pytest-randomly==3.15.0
hypothesis[numpy]==6.82.6
; Other test dependencies
; ...
mistletoe==1.2.1
commands =
pytest --basetemp={envtmpdir} \
black_it tests/ \
--cov=black_it \
--ignore=example/models \
--cov-report=xml \
--cov-report=html \
--cov-report=term {posargs}
[testenv:py{39,310,311,312}]
commands =
{[testenv]commands}
# test environment for notebooks
[testenv:py{39,310,311,312}-nb]
deps =
pytest==7.4.2
mesa==2.1.1
nbmake==1.5.4
commands = pytest examples/tests_on_toy_model.ipynb --nbmake --nbmake-timeout=300
[testenv:mypy]
deps =
hypothesis[numpy]==6.82.6
importlib-metadata==6.8.0
mistletoe==1.2.1
mypy==1.5.1
pytest==7.4.2
types-backports==0.1.3
types-setuptools==68.2.0.0
commands =
mypy black_it tests scripts examples
[testenv:black]
skip_install = True
deps = black==24.8.0
commands = black .
[testenv:black-check]
skip_install = True
deps = black==24.8.0
commands = black --check --verbose .
[testenv:ruff]
skip_install = True
deps = ruff==0.0.290
commands = ruff check --fix --show-fixes .
[testenv:ruff-check]
skip_install = True
deps = ruff==0.0.290
commands = ruff check .
[testenv:bandit]
skipsdist = True
skip_install = True
deps = bandit==1.7.5
commands = bandit --configfile .bandit.yaml --recursive black_it tests scripts examples
[testenv:vulture]
skipsdist = True
skip_install = True
deps = vulture==2.9.1
commands =
vulture black_it scripts/whitelists/package_whitelist.py
vulture examples scripts/whitelists/examples_whitelist.py
vulture tests scripts/whitelists/tests_whitelist.py
[testenv:darglint]
skipsdist = True
skip_install = True
deps =
darglint==1.8.1
commands = darglint black_it
[testenv:docs]
deps =
markdown-include==0.8.1
markdown==3.4.4
mkdocs-autorefs==0.5.0
mkdocs-material-extensions==1.2
mkdocs-material==9.4.1
mkdocs==1.5.3
mkdocstrings-python-legacy==0.2.3
mkdocstrings==0.22.0
mknotebooks==0.8.0
pymdown-extensions==10.3
commands =
mkdocs build --clean
[testenv:docs-serve]
deps =
markdown-include==0.8.1
markdown==3.4.4
mkdocs-autorefs==0.5.0
mkdocs-material-extensions==1.2
mkdocs-material==9.4.1
mkdocs==1.5.3
mkdocstrings-python-legacy==0.2.3
mkdocstrings==0.22.0
mknotebooks==0.8.0
pymdown-extensions==10.3
commands =
mkdocs build --clean
python -c 'print("###### Starting local server. Press Control+C to stop server ######")'
mkdocs serve
[testenv:check-copyright]
skip_install = True
deps =
commands = python3 scripts/check_copyright.py
[testenv:spell_check]
skip_install = True
deps =
allowlist_externals = {toxinidir}/scripts/spell-check.sh
commands = {toxinidir}/scripts/spell-check.sh --report