You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
2.2 KiB
95 lines
2.2 KiB
[tox]
|
|
skip_missing_interpreters = true
|
|
envlist =
|
|
3.7
|
|
3.8
|
|
3.9
|
|
3.10
|
|
pypy3
|
|
bench
|
|
lint
|
|
fmt
|
|
typing
|
|
docs
|
|
|
|
[testenv]
|
|
passenv = *
|
|
deps =
|
|
-rrequirements-dev.txt
|
|
commands =
|
|
python -c "import shutil; shutil.move('coincurve', '_coincurve')"
|
|
coverage run --parallel-mode -m pytest -v --benchmark-skip {posargs}
|
|
python -c "import shutil; shutil.move('_coincurve', 'coincurve')"
|
|
coverage combine
|
|
coverage report -m
|
|
|
|
[testenv:bench]
|
|
skip_install = true
|
|
envdir = {toxworkdir}/{env:PYTHON_VERSION:bench}
|
|
commands =
|
|
python -c "import shutil; shutil.move('coincurve', '_coincurve')"
|
|
pytest -v --benchmark-only --benchmark-sort=name --benchmark-cprofile=tottime
|
|
python -c "import shutil; shutil.move('_coincurve', 'coincurve')"
|
|
|
|
[testenv:lint]
|
|
envdir = {toxworkdir}/lint
|
|
skip_install = true
|
|
deps =
|
|
flake8>=3.9
|
|
flake8-bugbear>=20.1.4
|
|
flake8-quotes>=3.2.0
|
|
black>=21.12b0
|
|
isort[pyproject]>=5
|
|
commands =
|
|
flake8 .
|
|
black --check --diff .
|
|
isort --check-only --diff .
|
|
|
|
[testenv:fmt]
|
|
envdir = {[testenv:lint]envdir}
|
|
skip_install = true
|
|
deps = {[testenv:lint]deps}
|
|
commands =
|
|
isort .
|
|
black .
|
|
{[testenv:lint]commands}
|
|
|
|
[testenv:typing]
|
|
skip_install = true
|
|
deps =
|
|
mypy==0.790
|
|
commands =
|
|
mypy coincurve
|
|
|
|
[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
|
|
deps =
|
|
mkdocs~=1.2.2
|
|
; theme
|
|
mkdocs-material~=7.3.1
|
|
; plugins
|
|
mkdocs-minify-plugin~=0.4.1
|
|
mkdocs-git-revision-date-localized-plugin~=0.10.0
|
|
mkdocstrings~=0.16.2
|
|
; Extensions
|
|
pymdown-extensions~=9.0
|
|
mkdocs-material-extensions~=1.0.3
|
|
mkpatcher~=1.0.2
|
|
; Necessary for syntax highlighting in code blocks
|
|
Pygments~=2.10.0
|
|
commands =
|
|
python -m mkdocs {posargs}
|
|
|
|
[testenv:docs-ci]
|
|
setenv = {[testenv:docs]setenv}
|
|
deps = {[testenv:docs]deps}
|
|
commands =
|
|
python -c "import shutil; shutil.move('coincurve', '_coincurve')"
|
|
{[testenv:docs]commands}
|
|
python -c "import shutil; shutil.move('_coincurve', 'coincurve')"
|
|
|