forked from pybamm-team/PyBaMM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
72 lines (66 loc) · 2.15 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
[tox]
envlist = {windows}-{tests,unit,dev},tests,unit,dev
[testenv]
skipsdist = true
usedevelop = true
passenv = !windows-!mac: SUNDIALS_INST
whitelist_externals = !windows-!mac: sh
setenv =
!windows-!mac: SUNDIALS_INST = {env:SUNDIALS_INST:{homedir}/.local}
!windows-!mac: LD_LIBRARY_PATH = {homedir}/.local/lib{:}{env:LD_LIBRARY_PATH:}
deps =
dev-!windows-!mac: cmake
dev: black
dev,doctests: sphinx>=1.5
dev,doctests: pydata-sphinx-theme
dev,doctests: sphinx_design
dev,doctests: sphinx-copybutton
dev,doctests: myst-parser
!windows-!mac: scikits.odes
commands =
tests-!windows-!mac: sh -c "pybamm_install_jax" # install jax, jaxlib for ubuntu
tests: python run-tests.py --unit --folder all
unit: python run-tests.py --unit
integration: python run-tests.py --unit --folder integration
examples: python run-tests.py --examples
dev-!windows-!mac: sh -c "echo export LD_LIBRARY_PATH={env:LD_LIBRARY_PATH} >> {envbindir}/activate"
doctests: python run-tests.py --doctest
[testenv:pybamm-requires]
platform = [linux, darwin]
skip_install = true
passenv = HOME
whitelist_externals = git
deps =
wget
cmake
commands =
python {toxinidir}/scripts/install_KLU_Sundials.py
- git clone https://github.com/pybind/pybind11.git {toxinidir}/pybind11
[testenv:coverage]
deps =
coverage
scikits.odes
commands =
!windows-!mac: sh -c "pybamm_install_jax"
coverage run run-tests.py --nosub
# Some tests make use of multiple processes through
# multiprocessing. Coverage data is then generated for each
# process separately and data must then be combined into one
# single coverage data file.
coverage combine
coverage xml
[testenv:docs]
skipdist = false
usedevelop = false
skip_install = false
deps =
sphinx>=1.5
pydata-sphinx-theme
sphinx-autobuild
changedir = docs
commands = sphinx-autobuild --open-browser -qT . {envtmpdir}/html
[coverage:run]
source = pybamm
# By default coverage data isn't collected in forked processes, see
# https://coverage.readthedocs.io/en/coverage-5.3.1/subprocess.html
concurrency = multiprocessing