-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
89 lines (78 loc) · 1.92 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
#black and flake8: https://sbarnea.com/lint/black/
#github page: https://coderefinery.github.io/documentation/gh_workflow/
[tox]
minversion = 3.24.0
envlist =
clean,
flake8,
py39,
docs
[gh-actions]
# See https://pypi.org/project/tox-gh-actions/
python =
3.9: py39
[flake8]
basepython = python3.9
max-line-length = 88
exclude = tests/*
extend-ignore = I001, I003, I004, I005, E203, E722
deps =
flake8
flake8-black
flake8-isort
# isort<5
[testenv:flake8]
basepython = python3.9
max-line-length = 88
exclude = tests/*
extend-ignore = I001, I003, I004, I005, E203, E722
deps =
flake8
flake8-black
flake8-isort
# isort<5
commands = flake8 pyECM
[py39]
basepython = py39
commands =
python setup.py sdist
[testenv]
setenv = PYTHONPATH = "."
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements_dev.txt
depends =
{py39}: clean
report: py39
commands =
pytest -v --basetemp={envtmpdir} -W ignore::DeprecationWarning --mpl
; pytest --nbmake workflow/ --ignore=workflow/testing
pytest --cov=pyECM/ tests --cov-append --cov-report=term-missing --cov-fail-under=90 -W ignore::DeprecationWarning --mpl
[testenv:report]
deps = coverage
skip_install = true
commands =
coverage report
coverage html
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
basepython = python3.9
deps =
pytest
mendeleev
sphinx
sphinx_rtd_theme
myst-parser
docutils
sphinxcontrib-bibtex
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs/source/ "{toxworkdir}/docs_out" --color -W -b html {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
[testenv:end]
commands =
coverage report --omit='.tox/*'
coverage html --omit='.tox/*'