tox.ini 1.33 KB
Newer Older
1
[tox]
Antoine Berchet's avatar
Antoine Berchet committed
2
envlist=py38, coverage, style
3
4
requires=
    numpy
5
6

[testenv]
7
8
deps=
    numpy
9
setenv =
10
    COVERAGE_FILE={toxinidir}/coverage_raw/{envname}/.coverage
11
    PYCIF_DATATEST=/tmp/PYCIF_DATA_TEST/
12
extras=test
13
skipsdist=True
Antoine Berchet's avatar
Antoine Berchet committed
14
usedevelop=True
15
commands=
Antoine Berchet's avatar
Antoine Berchet committed
16
    pytest --basetemp={envtmpdir} --cov=pycif --no-cov-on-fail --html reports/pytest-{envname}.html --self-contained-html {posargs}
17
18
19
20
21
22

[testenv:py27]
basepython=python2.7
deps=
    numpy<1.17

Antoine Berchet's avatar
Antoine Berchet committed
23
24
;[testenv:py36]
;basepython=python3.6
25

Antoine Berchet's avatar
Antoine Berchet committed
26
27
;[testenv:py39]
;basepython=python3.9
Antoine Berchet's avatar
Antoine Berchet committed
28

Antoine Berchet's avatar
Antoine Berchet committed
29
30
31
[testenv:py38]
basepython=python3.8

32
[testenv:coverage]
33
34
35
36
skip_install=true
deps=
	coverage
commands =
37
	/usr/bin/env bash -c '{envpython} -m coverage combine {toxinidir}/coverage_raw/py*/.coverage'
38
;    coverage report --show-missing
39

40
41
    coverage html -d reports/coverage
    coverage xml -o reports/coverage.xml
42
43
44
45
46
47
48
49

[testenv:style]
skip_install=true
deps=
	flake8
	flake8-html
commands =
    flake8 --format=html --htmldir=reports/flake8/ {toxinidir}/pycif {toxinidir}/tests
Antoine Berchet's avatar
Antoine Berchet committed
50
51
52
53
54
55
56

[testenv:docs]
description = invoke sphinx-build to build the HTML docs
deps = sphinx >= 1.7.5, < 2
commands = sphinx-build -d "{toxworkdir}/docs_doctree" doc "{toxworkdir}/docs_out" --color -W -bhtml {posargs}
           python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'