forked from ethereum/web3.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
121 lines (110 loc) · 3.53 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
[tox]
envlist=
py{37,38,39,310}-ens
py{37,38,39,310}-ethpm
py{37,38,39,310}-core
py{37,38,39,310}-integration-{goethereum,ethtester}
lint
docs
benchmark
py{37,38,39,310}-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= 100
exclude= venv*,.tox,docs,build
ignore=W503
[testenv]
whitelist_externals=/usr/bin/make
install_command=python -m pip install --no-use-pep517 {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-http: pytest {posargs:tests/integration/go_ethereum/test_goethereum_http.py}
integration-goethereum-ws: pytest {posargs:tests/integration/go_ethereum/test_goethereum_ws.py}
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
[testenv:lint]
basepython=python
extras=linter
commands=
flake8 {toxinidir}/web3 {toxinidir}/ens {toxinidir}/ethpm {toxinidir}/tests --exclude {toxinidir}/ethpm/ethpm-spec
isort --recursive --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
whitelist_externals=
/bin/rm
/bin/bash
commands=
/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.auto import w3"
[testenv:py37-wheel-cli]
deps={[common-wheel-cli]deps}
whitelist_externals={[common-wheel-cli]whitelist_externals}
commands={[common-wheel-cli]commands}
skip_install=true
[testenv:py38-wheel-cli]
deps={[common-wheel-cli]deps}
whitelist_externals={[common-wheel-cli]whitelist_externals}
commands={[common-wheel-cli]commands}
skip_install=true
[testenv:py39-wheel-cli]
deps={[common-wheel-cli]deps}
whitelist_externals={[common-wheel-cli]whitelist_externals}
commands={[common-wheel-cli]commands}
skip_install=true
[testenv:py310-wheel-cli]
deps={[common-wheel-cli]deps}
whitelist_externals={[common-wheel-cli]whitelist_externals}
commands={[common-wheel-cli]commands}
skip_install=true
[common-wheel-cli-windows]
deps=wheel
whitelist_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.auto import w3"
[testenv:py37-wheel-cli-windows]
deps={[common-wheel-cli]deps}
whitelist_externals={[common-wheel-cli-windows]whitelist_externals}
commands={[common-wheel-cli-windows]commands}
skip_install=true