forked from ethereum/web3.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
135 lines (122 loc) · 4.52 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
[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}
lint
docs
benchmark
py{37,38,39,310,311}-wheel-cli
[isort]
combine_as_imports=True
force_sort_within_sections=True
include_trailing_comma=True
known_standard_library=pytest
known_third_party=lru,eth_tester
known_first_party=web3,ens,ethpm
line_length=21
multi_line_output=3
skip=web3/main.py,web3/utils/windows.py,ethpm/ethpm-spec/
use_parentheses=True
[flake8]
max-line-length=88
exclude= venv*,.tox,docs,build
extend-ignore=E203,W503
[testenv]
allowlist_externals=/usr/bin/make
install_command=python -m pip install {opts} {packages}
usedevelop=True
commands=
core: pytest {posargs:tests/core}
ens: pytest {posargs:tests/ens}
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_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-ethtester: pytest {posargs:tests/integration/test_ethereum_tester.py}
docs: make -C {toxinidir} validate-docs
deps =
.[dev]
passenv =
GETH_BINARY
GETH_VERSION
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
[testenv:lint]
basepython=python
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 --recursive --skip {toxinidir}/ethpm/_utils/protobuf/ipfs_file_pb2.py --skip {toxinidir}/ethpm/ethpm-spec --check-only --diff {toxinidir}/web3/ {toxinidir}/ens/ {toxinidir}/ethpm/ {toxinidir}/tests/
mypy -p web3 -p ethpm -p ens --config-file {toxinidir}/mypy.ini
[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
[common-wheel-cli]
deps=wheel
allowlist_externals=
/bin/rm
/bin/bash
commands=
pip install --upgrade pip
/bin/rm -rf build dist
python setup.py sdist bdist_wheel
/bin/bash -c 'pip install --upgrade "$(ls dist/web3-*-py3-none-any.whl)" --progress-bar off'
python -c "from web3 import Web3"
[testenv:py37-wheel-cli]
deps={[common-wheel-cli]deps}
allowlist_externals={[common-wheel-cli]allowlist_externals}
commands={[common-wheel-cli]commands}
skip_install=true
[testenv:py38-wheel-cli]
deps={[common-wheel-cli]deps}
allowlist_externals={[common-wheel-cli]allowlist_externals}
commands={[common-wheel-cli]commands}
skip_install=true
[testenv:py39-wheel-cli]
deps={[common-wheel-cli]deps}
allowlist_externals={[common-wheel-cli]allowlist_externals}
commands={[common-wheel-cli]commands}
skip_install=true
[testenv:py310-wheel-cli]
deps={[common-wheel-cli]deps}
allowlist_externals={[common-wheel-cli]allowlist_externals}
commands={[common-wheel-cli]commands}
skip_install=true
[testenv:py311-wheel-cli]
deps={[common-wheel-cli]deps}
allowlist_externals={[common-wheel-cli]allowlist_externals}
commands={[common-wheel-cli]commands}
skip_install=true
[common-wheel-cli-windows]
deps=wheel
allowlist_externals=
bash.exe
commands=
bash.exe -c "rm -rf build dist"
python setup.py sdist bdist_wheel
bash.exe -c 'pip install --upgrade "$(ls dist/web3-*-py3-none-any.whl)" --progress-bar off'
python -c "from web3 import Web3"
[testenv:py37-wheel-cli-windows]
deps={[common-wheel-cli]deps}
allowlist_externals={[common-wheel-cli-windows]allowlist_externals}
commands={[common-wheel-cli-windows]commands}
skip_install=true