-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
94 lines (70 loc) · 2.99 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
[tox]
minversion = 3.14
envlist = py38-{test,runcmd}, py39-{test,runcmd}, run-{cmd,blackcheck,black,isort,isortcheck}, docs, coverage
[testenv:.tox]
envdir = {toxworkdir}/.tox
[testenv]
basepython =
py39: python3.9
py38,run,docs,coverage,bootstrap: python3.8
envdir =
py39: {toxworkdir}/py39
py38,run,docs,coverage: {toxworkdir}/py38
deps =
cython
numpy
scipy
usedevelop = true
extras=
dev
passenv = HOME CI TRAVIS TRAVIS_* GITHUB_* SPHINX_* COVERALLS* CODECOV* SPELLCHECK SSH_AUTH_SOCK http_proxy https_proxy no_proxy
description =
py{38,39}-test: Run tests in the corresponding environment
py{38,39}-runcmd: Run arbitrary command following "--" in the corresponding environment
commands_pre =
python -V
commands =
py{38,39}-runcmd: {posargs:python -c 'print("No command")'}
py{38,39}-test: pytest {posargs:-vvv --doctest-modules --doctest-glob="*.rst" --doctest-glob="*.md" --cov=qalgebra --nbval --sanitize-with docs/sources/nbval_sanitize.cfg --durations=10 -x -s src tests docs/sources README.md CONTRIBUTING.md}
[testenv:docs]
description = Generate the docs
commands =
python -m sphinx -W "docs/sources/" -d "docs/_build/doctree" {posargs: "docs/_build/html"}
[testenv:bootstrap]
description = Configure tox
envdir = {toxworkdir}/bootstrap
deps = tox
skip_install = True
commands_pre =
commands =
python scripts/bootstrap.py
[testenv:coverage]
description = Generate a coverage report
depends = py37-test
commands =
coverage html
python -c 'import pathlib; print("coverage report available in \{\}".format(pathlib.Path(".") / "htmlcov" / "index.html"))'
[testenv:run-cmd]
description = Run arbitrary command following "--" in the current stable environment, e.g. "tox -e run-cmd -- ipython"
commands = {posargs:python -c 'print("No command")'}
[testenv:run-black]
description = Run black formatter in the current stable environment
commands = python -m black --skip-string-normalization --line-length 79 {posargs:src tests}
[testenv:run-blackcheck]
description = Run black formatter check in the latext venv
commands = python -m black --skip-string-normalization --line-length 79 --check --diff {posargs:src tests}
[testenv:run-isort]
description = Run isort formatter in the current stable environment
commands = python -m isort --recursive {posargs:src tests}
[testenv:run-isortcheck]
description = Run isort formatter check in the current stable environment
commands = python -m isort --recursive --check-only --diff {posargs:src tests}
[testenv:run-flake8]
description = Run flake8 formatter check in the current stable environment
commands = python -m flake8 {posargs:src tests}
[testenv:run-pylint]
description = Run pylint formatter check in the current stable environment
commands = python -m pylint -j 0 {posargs:src}
[testenv:run-travis-encrypt]
description = Encrypt an variable for .travis.yml, e.g. `tox -e run-travis-encrypt -- --password GITHUB_TOKEN=4cef449e1762da64012e8f3250cf002524e14cd1`
commands = travis-encrypt qalgebra qalgebra {posargs:}