-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
93 lines (86 loc) · 2.32 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
[tox]
skip_missing_interpreters = true
envlist =
3.8
3.9
3.10
3.11
3.12
pypy3
bench
lint
fmt
typing
docs
[testenv]
passenv = *
deps =
-rrequirements-dev.txt
commands =
python -c "import shutil; shutil.move('electrumsv_secp256k1', '_electrumsv_secp256k1')"
coverage run --parallel-mode -m pytest -v --benchmark-skip {posargs}
python -c "import shutil; shutil.move('_electrumsv_secp256k1', 'electrumsv_secp256k1')"
coverage combine
coverage report -m
[testenv:bench]
skip_install = true
envdir = {toxworkdir}/{env:PYTHON_VERSION:bench}
commands =
python -c "import shutil; shutil.move('electrumsv_secp256k1', '_electrumsv_secp256k1')"
- output=pytest -v --benchmark-only --benchmark-sort=name --benchmark-cprofile=tottime
python -c "import shutil; shutil.move('_electrumsv_secp256k1', 'electrumsv_secp256k1')"
[testenv:lint]
envdir = {toxworkdir}/lint
skip_install = true
deps =
black>=21.12b0
ruff
commands =
ruff .
black --check --diff .
[testenv:fmt]
envdir = {[testenv:lint]envdir}
skip_install = true
deps = {[testenv:lint]deps}
commands =
black .
ruff --fix .
{[testenv:lint]commands}
[testenv:typing]
skip_install = true
deps =
mypy>=0.790
commands =
mypy electrumsv_secp256k1
[testenv:docs]
usedevelop = true
setenv =
; Pretty __repr__ for defaults of complex types
COINCURVE_BUILDING_DOCS=true
; Use a set timestamp for reproducible builds.
; See https://reproducible-builds.org/specs/source-date-epoch/
SOURCE_DATE_EPOCH=1580601600
PYTHONWARNINGS=ignore::UserWarning:mkdocstrings.handlers.python
deps =
mkdocs~=1.3.1
; theme
mkdocs-material~=8.3.9
; plugins
mkdocs-minify-plugin~=0.5.0
mkdocs-git-revision-date-localized-plugin~=1.1.0
mkdocstrings[python-legacy]~=0.18.1
; Extensions
pymdown-extensions~=9.5.0
mkdocs-material-extensions~=1.0.3
mkpatcher~=1.0.2
; Necessary for syntax highlighting in code blocks
Pygments~=2.12.0
commands =
python -m mkdocs {posargs}
[testenv:docs-ci]
setenv = {[testenv:docs]setenv}
deps = {[testenv:docs]deps}
commands =
python -c "import shutil; shutil.move('electrumsv_secp256k1', '_electrumsv_secp256k1')"
{[testenv:docs]commands}
python -c "import shutil; shutil.move('_electrumsv_secp256k1', 'electrumsv_secp256k1')"