forked from qucontrol/krotov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox-conda.ini
184 lines (149 loc) · 4.9 KB
/
tox-conda.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
[tox]
minversion = 3.7
envlist = py36-{test,runcmd}, py37-{test,runcmd}, py38-{test,runcmd}, run-{cmd,blackcheck,black,isort,isortcheck}, docs, coverage
requires = tox-conda
[testenv:.tox]
envdir = {toxworkdir}/.tox
[testenv]
basepython =
# current "stable" python
py38,run,docs,coverage,clean,bootstrap: python3.8
# older pythons
py37: python3.7
py36: python3.6
envdir =
# current "stable" environment
py38,run,docs,coverage: {toxworkdir}/py38
# other "stable" environment
py37: {toxworkdir}/py37
py36: {toxworkdir}/py36
conda_deps =
cython
py38,run,docs,coverage: numpy=1.20.3
py37: numpy=1.17.2
py36: numpy=1.15.4
py38,run,docs,coverage: scipy=1.6.3
py37: scipy=1.3.1
py36: scipy=1.2.0
py38,run,docs,coverage: qutip=4.6.1
py37: qutip=4.5.0
py36: qutip=4.3.1
conda_channels=
default
conda-forge
usedevelop = true
extras=
dev
setenv =
MATPLOTLIBRC = tests
passenv = HOME CI TRAVIS TRAVIS_* COVERALLS* CODECOV* SPELLCHECK SSH_AUTH_SOCK http_proxy https_proxy no_proxy
description =
py{36,37,38}-test: Run tests in the corresponding environment
py{36,37,38}-runcmd: Run arbitrary command following "--" in the corresponding environment
py38qtm-test: Run tests with Python 3.8 and the QuTiP-master
py38qtm-runcmd: Run arbitrary command following "--" in the environment for py38qtm-test
commands_pre =
python -V
commands =
py{36,37,38}-runcmd: {posargs:python -c 'print("No command")'}
py{36,37,38}-test: py.test -vvv --doctest-modules --cov=krotov --nbval --sanitize-with docs/nbval_sanitize.cfg --ignore docs/_build/ --durations=10 -x -s {posargs:src tests docs README.rst}
[testenv:docs]
description = Generate the docs
changedir = {toxinidir}/docs
commands_pre =
python -c 'import shutil; from pathlib import Path; shutil.rmtree(Path("notebooks")/ ".ipynb_checkpoints", ignore_errors=True)'
commands =
sphinx-build . {posargs: _build/html --color -T -d _build/doctree}
[testenv:bootstrap]
description = Configure tox
envdir = {toxworkdir}/bootstrap
deps = tox
conda_deps =
skip_install = True
commands_pre =
commands =
python scripts/bootstrap.py
[testenv:clean]
description = Clean up
envdir = {toxworkdir}/clean_
conda_deps =
skip_install = True
commands_pre =
whitelist_externals = tox
commands =
python scripts/clean.py tests
python scripts/clean.py build
python scripts/clean.py docs
tox -e clean-venv-unix
tox -e clean-venv-win32
[testenv:clean-docs]
description = Clean up files resulting from generating the docs
envdir = {toxworkdir}/clean
conda_deps =
skip_install = True
commands_pre =
commands =
python scripts/clean.py docs
[testenv:clean-tests]
description = Clean up files resulting from testing/coverage
envdir = {toxworkdir}/clean
conda_deps =
skip_install = True
commands_pre =
commands =
python scripts/clean.py tests
[testenv:clean-build]
description = Clean up build artifacts (including __pycache__ folders)
envdir = {toxworkdir}/clean
conda_deps =
skip_install = True
commands_pre =
commands =
python scripts/clean.py build
[testenv:clean-venv-unix]
description = Remove tox virtual environments
envdir = {toxworkdir}/clean
conda_deps =
skip_install = True
commands_pre =
platform = linux|bsd|darwin
whitelist_externals = rm
commands =
rm -rf .tox
[testenv:clean-venv-win32]
description = Remove tox virtual environments
envdir = {toxworkdir}/clean
conda_deps =
skip_install = True
commands_pre =
platform = win32
whitelist_externals = cmd
commands =
cmd /C rmdir /S /Q .tox
[testenv:coverage]
description = Generate a coverage report
depends = py38-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}