forked from ethereum/web3.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
101 lines (93 loc) · 3.78 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
[tox]
envlist=
py{37,38,39,310,311}-ens
py{37,38,39,310,311}-ethpm
py{37,38,39,310,311}-core
py{37,38,39,310,311}-integration-{goethereum,ethtester}
py{38,39,310,311}-lint
py{37,38,39,310,311}-wheel-cli
docs
benchmark
[flake8]
exclude= venv*,.tox,docs,build
extend-ignore=E203,W503
max-line-length=88
per-file-ignores=__init__.py:F401
[testenv]
allowlist_externals=/usr/bin/make
install_command=python -m pip install {opts} {packages}
usedevelop=True
commands=
core: pytest {posargs:tests/core -m "not asyncio"}
core_async: pytest {posargs:tests/core -m asyncio}
ens: pytest {posargs:tests/ens --ignore=tests/ens/normalization/test_normalize_name_ensip15.py}
ensip15: pytest {posargs:tests/ens/normalization/test_normalize_name_ensip15.py -q}
ethpm: pytest {posargs:tests/ethpm}
integration-goethereum-ipc: pytest {posargs:tests/integration/go_ethereum/test_goethereum_ipc.py}
integration-goethereum-ipc_flaky: pytest {posargs:tests/integration/go_ethereum/test_goethereum_ipc.py --flaky}
integration-goethereum-http: pytest {posargs:tests/integration/go_ethereum/test_goethereum_http.py -k "not Async"}
integration-goethereum-http_async: pytest {posargs:tests/integration/go_ethereum/test_goethereum_http.py -k Async}
integration-goethereum-http_async_flaky: pytest {posargs:tests/integration/go_ethereum/test_goethereum_http.py -k Async --flaky}
integration-goethereum-http_flaky: pytest {posargs:tests/integration/go_ethereum/test_goethereum_http.py --flaky}
integration-goethereum-ws: pytest {posargs:tests/integration/go_ethereum/test_goethereum_ws.py}
integration-goethereum-ws_flaky: pytest {posargs:tests/integration/go_ethereum/test_goethereum_ws.py --flaky}
integration-goethereum-ws_v2: pytest {posargs:tests/integration/go_ethereum/test_goethereum_ws_v2}
integration-goethereum-ws_v2_flaky: pytest {posargs:tests/integration/go_ethereum/test_goethereum_ws_v2 --flaky}
integration-ethtester: pytest {posargs:tests/integration/test_ethereum_tester.py}
integration-ethtester_flaky: pytest {posargs:tests/integration/test_ethereum_tester.py --flaky}
docs: make -C {toxinidir} validate-docs
deps =
.[dev]
passenv =
GETH_BINARY
GOROOT
GOPATH
WEB3_INFURA_PROJECT_ID
WEB3_INFURA_API_SECRET
basepython =
docs: python3.9
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
[common-lint]
extras=linter
commands=
flake8 {toxinidir}/web3 {toxinidir}/ens {toxinidir}/ethpm {toxinidir}/tests --exclude {toxinidir}/ethpm/ethpm-spec,{toxinidir}/**/*_pb2.py
black {toxinidir}/ens {toxinidir}/ethpm {toxinidir}/web3 {toxinidir}/tests {toxinidir}/setup.py --exclude /ethpm/ethpm-spec/|/ethpm/_utils/protobuf/ipfs_file_pb2\.py --check
isort --check-only --diff {toxinidir}/web3/ {toxinidir}/ens/ {toxinidir}/ethpm/ {toxinidir}/tests/
mypy -p web3 -p ens --config-file {toxinidir}/mypy.ini
[testenv:lint]
basepython: python
extras: {[common-lint]extras}
commands: {[common-lint]commands}
[testenv:py{38,39,310,311}-lint]
extras: {[common-lint]extras}
commands: {[common-lint]commands}
[testenv:benchmark]
basepython=python
commands=
python {toxinidir}/web3/tools/benchmark/main.py --num-calls 5
python {toxinidir}/web3/tools/benchmark/main.py --num-calls 50
python {toxinidir}/web3/tools/benchmark/main.py --num-calls 100
[testenv:py{37,38,39,310,311}-wheel-cli]
deps=
wheel
build
allowlist_externals=
/bin/rm
/bin/bash
/bin/mktemp
commands=
/bin/bash {toxinidir}/web3/scripts/release/test_wheel_install.sh
skip_install=true
[testenv:py311-wheel-cli-windows]
deps=
wheel
build[virtualenv]
allowlist_externals=
bash.exe
commands=
bash.exe {toxinidir}/web3/scripts/release/test_windows_wheel_install.sh
skip_install=true