forked from fetchai/agents-aea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
355 lines (310 loc) · 10 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
; By default, testenvs are configured to:
; - don't skip dist (skipsdist = False)
; - don't skip the package installation (skip_install = False)
; - don't use source installation (usedevelop = False)
; where one of those steps is not necessary for the test,
; we set the associated flag (e.g. for linting we don't need
; the package installation).
[tox]
envlist = bandit, black, black-check, isort, isort-check, copyright_check, docs, flake8, liccheck, mypy, py{3.6,3.7,3.8,3.9,3.10}, dependencies_check, plugins_deps
[testenv]
basepython = python3
whitelist_externals = /bin/sh
passenv = *
extras = all
deps =
aiohttp==3.7.4
aioprometheus==20.0.1
black==19.10b0
colorlog==4.1.0
defusedxml==0.6.0
docker==4.2.0
gym==0.15.6
isort==5.7.0
mistune==2.0.0a4
numpy>=1.18.1
oef==0.8.1
openapi-core==0.13.2
openapi-spec-validator==0.2.8
pexpect==4.8.0
pytest==7.0.0
pytest-asyncio==0.16.0
pytest-cov==3.0.0
pytest-custom-exit-code==0.3.0
pytest-randomly==3.10.3
pytest-rerunfailures==10.2
scikit-image>=0.17.2
sqlalchemy==1.4.17
temper-py==0.0.3
yoti==2.14.0
; Plugin dependencies. We need this
; because we use --no-deps to install the plugins.
; aea_ledger_cosmos/aea_ledger_fetchai
ecdsa>=0.15
asn1crypto==1.4.0
bech32==1.2.0
; aea_ledger_ethereum
web3==5.12.0
ipfshttpclient==0.6.1
eth-account==0.5.2
; for password encryption in cosmos
pycryptodome>=3.10.1
cosmpy>=0.4.1,<0.5.0
commands =
; for some reason tox installs aea without respect to the dependencies version specified in setup.py. at least in CI env
; so install current aea in a normal way
pip install {toxinidir}[all]
python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-ethereum
python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-ethereum
python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-cosmos
python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-fetchai
python -m pip install --no-deps file://{toxinidir}/plugins/aea-cli-ipfs
pytest -rfE --doctest-modules aea packages/fetchai/connections packages/fetchai/protocols packages/fetchai/skills tests/ --cov=aea --cov=packages/fetchai/connections --cov=packages/fetchai/contracts --cov=packages/fetchai/protocols --cov=packages/fetchai/skills --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing --cov-config=.coveragerc {posargs}
[testenv:py3.6]
basepython = python3.6
deps =
{[testenv]deps}
tensorflow==2.4.0
[testenv:py3.7]
basepython = python3.7
deps =
{[testenv]deps}
tensorflow==2.8.0
[testenv:py3.7-cov]
basepython = python3.7
usedevelop = True
deps =
{[testenv]deps}
tensorflow==2.8.0
[testenv:py3.8]
basepython = python3.8
deps =
{[testenv]deps}
tensorflow==2.8.0
[testenv:py3.9]
basepython = python3.9
deps =
{[testenv]deps}
tensorflow==2.8.0
[testenv:py3.10]
basepython = python3.10
deps =
{[testenv]deps}
tensorflow==2.8.0
[plugins]
commands =
python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-ethereum
python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-cosmos
python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-fetchai
python -m pip install --no-deps file://{toxinidir}/plugins/aea-cli-ipfs
pytest -rfE plugins/aea-ledger-fetchai/tests --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing --cov=aea_ledger_fetchai --cov-config=.coveragerc --suppress-no-test-exit-code {posargs}
pytest -rfE plugins/aea-ledger-ethereum/tests --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing --cov=aea_ledger_ethereum --cov-config=.coveragerc --suppress-no-test-exit-code {posargs}
pytest -rfE plugins/aea-ledger-cosmos/tests --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing --cov=aea_ledger_cosmos --cov-config=.coveragerc --suppress-no-test-exit-code {posargs}
pytest -rfE plugins/aea-cli-ipfs/tests --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing --cov=aea_cli_ipfs --cov-config=.coveragerc --suppress-no-test-exit-code {posargs}
[testenv:plugins-py3.6]
basepython = python3.6
commands = {[plugins]commands}
[testenv:plugins-py3.7]
basepython = python3.7
commands = {[plugins]commands}
[testenv:plugins-py3.7-cov]
basepython = python3.7
usedevelop = True
commands = {[plugins]commands}
[testenv:plugins-py3.8]
basepython = python3.8
commands = {[plugins]commands}
[testenv:plugins-py3.9]
basepython = python3.9
commands = {[plugins]commands}
[testenv:plugins-py3.10]
basepython = python3.10
commands = {[plugins]commands}
[testenv:bandit]
skipsdist = True
skip_install = True
deps =
bandit==1.7.0
commands = bandit -r aea benchmark examples packages \
plugins/aea-ledger-fetchai/aea_ledger_fetchai \
plugins/aea-ledger-ethereum/aea_ledger_ethereum \
plugins/aea-ledger-cosmos/aea_ledger_cosmos \
plugins/aea-cli-ipfs/aea_cli_ipfs
bandit -s B101 -r tests scripts
[testenv:black]
skipsdist = True
skip_install = True
deps =
black==19.10b0
commands = black aea benchmark examples packages plugins scripts tests
[testenv:black-check]
skipsdist = True
skip_install = True
deps =
black==19.10b0
commands =black aea benchmark examples packages plugins scripts tests --check --verbose
[testenv:isort]
skipsdist = True
skip_install = True
deps =
isort==5.7.0
commands = isort aea benchmark examples packages plugins scripts tests
[testenv:isort-check]
skipsdist = True
skip_install = True
deps =
isort==5.7.0
commands = isort --check-only --verbose aea benchmark examples packages plugins scripts tests
[testenv:copyright_check]
skipsdist = True
skip_install = True
deps =
commands = {toxinidir}/scripts/check_copyright_notice.py --directory {toxinidir}
[testenv:hash_check]
skipsdist = True
usedevelop = True
deps =
ipfshttpclient==0.6.1
commands = {toxinidir}/scripts/generate_ipfs_hashes.py --check {posargs}
[testenv:package_version_checks]
skipsdist = True
usedevelop = True
deps =
commands = {toxinidir}/scripts/check_package_versions_in_docs.py
[testenv:package_dependencies_checks]
skipsdist = True
usedevelop = True
deps =
commands = {toxinidir}/scripts/check_packages.py
[testenv:docs]
skipsdist = True
skip_install = True
deps =
bs4==0.0.1
jinja2==3.0.3
markdown==3.3.6
mkdocs==1.1
pygments ==2.7.4
mkdocs-material==6.2.8
pymdown-extensions==9.1
commands = pip3 install git+https://github.com/pugong/mkdocs-mermaid-plugin.git#egg=mkdocs-mermaid-plugin
mkdocs build --clean
[testenv:docs-serve]
skipsdist = True
skip_install = True
deps =
bs4==0.0.1
jinja2==3.0.3
markdown==3.3.6
mkdocs==1.1
mkdocs-material==6.2.8
pymdown-extensions==9.1
commands = pip3 install git+https://github.com/pugong/mkdocs-mermaid-plugin.git#egg=mkdocs-mermaid-plugin
mkdocs build --clean
python -c 'print("###### Starting local server. Press Control+C to stop server ######")'
mkdocs serve -a localhost:8080
[testenv:flake8]
skipsdist = True
skip_install = True
deps =
flake8==3.7.9
flake8-bugbear==20.1.4
flake8-docstrings==1.6.0
flake8-eradicate==0.4.0
flake8-isort==4.0.0
pydocstyle==3.0.0
commands = flake8 aea benchmark examples packages plugins scripts tests
[testenv:liccheck]
skipsdist = True
usedevelop = True
deps =
liccheck==0.6.0
commands = {toxinidir}/scripts/freeze_dependencies.py -o {envtmpdir}/requirements.txt
liccheck -s strategy.ini -r {envtmpdir}/requirements.txt -l PARANOID
[testenv:mypy]
skipsdist = True
skip_install = True
deps =
aiohttp==3.7.4
base58>=1.0.3
bech32==1.2.0
mypy==0.761
packaging>=20.4,<=21.5
web3==5.12.0
yoti==2.14.0
asn1crypto==1.4.0
commands = mypy aea packages --disallow-untyped-defs
mypy benchmark examples --check-untyped-defs
mypy scripts tests
[testenv:pylint]
whitelist_externals = /bin/sh
skipsdist = True
deps =
pylint==2.6.0
pytest==7.0.0
gitpython>=3.1.14
commands =
python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-ethereum
python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-cosmos
python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-fetchai
python -m pip install --no-deps file://{toxinidir}/plugins/aea-cli-ipfs
sh -c "pylint aea benchmark packages plugins/aea-ledger-fetchai/aea_ledger_fetchai plugins/aea-ledger-ethereum/aea_ledger_ethereum plugins/aea-ledger-cosmos/aea_ledger_cosmos plugins/aea-cli-ipfs/aea_cli_ipfs scripts examples/*"
[testenv:safety]
skipsdist = True
skip_install = True
deps =
safety==1.10.3
commands = safety check -i 37524 -i 38038 -i 37776 -i 38039 -i 39621 -i 40291 -i 39706
[testenv:vulture]
skipsdist = True
skip_install = True
deps =
vulture==2.3
commands = vulture aea scripts/whitelist.py --exclude "*_pb2.py"
[testenv:darglint]
skipsdist = True
skip_install = True
deps =
darglint==1.8.0
commands = darglint aea benchmark examples libs packages plugins scripts
[testenv:check_doc_links]
skipsdist = True
usedevelop = True
deps =
commands = {toxinidir}/scripts/check_doc_links.py
[testenv:check_api_docs]
skipsdist = True
usedevelop = True
deps =
pydoc-markdown==3.10.3
commands = {toxinidir}/scripts/generate_api_docs.py --check-clean
[testenv:check_generate_all_protocols]
skipsdist = True
usedevelop = True
deps =
ipfshttpclient==0.6.1
black==19.10b0
isort==5.7.0
commands = {toxinidir}/scripts/generate_all_protocols.py --no-bump --check-clean
[testenv:spell_check]
skipsdist = True
usedevelop = True
deps =
commands = {toxinidir}/scripts/spell-check.sh
[testenv:dependencies_check]
skipsdist = True
skip_install = True
commands =
pip install {toxinidir}[all]
pip uninstall aea -y
python {toxinidir}/scripts/check_imports_and_dependencies.py
[testenv:plugins_env]
skipsdist = True
skip_install = True
passenv = *
deps =
.[all]
whitelist_externals = /bin/sh
commands =
- /bin/sh -c "rm -fr ./*private_key.txt"
{posargs}