forked from Ptychography-4-0/ptychography
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
89 lines (83 loc) · 2.46 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
[tox]
envlist = py{36,37}
[testenv]
commands=
pytest --durations=5 --cov=ptychography40 --cov-report=term --cov-report=html --cov-report=xml {posargs:tests/}
pytest --doctest-modules src/ptychography40/
deps=
-rtest_requirements.txt
setenv=
# Using pytest in combination with tox on files that are part of the installed package
# leads to collisions between the local source tree and the installed package when running tests.
# See https://github.com/pytest-dev/pytest/issues/2042
PY_IGNORE_IMPORTMISMATCH=1
[testenv:flake8]
changedir={toxinidir}
deps=
flake8
commands=
flake8 --config=setup.cfg src/
skipsdist=True
skip_install=True
# general QA stuff here, we don't want to fail the flake8 build for unrelated reasons
[testenv:qa]
changedir={toxinidir}
deps=
pyroma
pygments
twine
commands=
python setup.py sdist
python setup.py bdist_wheel
twine check dist/*
pyroma -n 10 {toxinidir}
skipsdist=True
skip_install=True
[testenv:docs]
changedir={toxinidir}
basepython=python3.7
whitelist_externals=
make
setenv=
PYTHONPATH={toxinidir}
commands=
python "{toxinidir}/scripts/build-authors-contributors"
sphinx-autobuild -b html "{toxinidir}/docs/source" "{toxinidir}/docs/build/html" --port 8009 {posargs}
deps=
-rdocs_requirements.txt
skipsdist=True
# just a non-watching version of the docs environment above, also building twice for bibs
[testenv:docs-build-ci]
changedir={toxinidir}
basepython=python3
setenv=
PYTHONPATH={toxinidir}
commands=
python "{toxinidir}/scripts/build-authors-contributors"
# Two runs to get complete bibliography. The first one will throw warnings about missing
# citations.
sphinx-build -j auto -b html "{toxinidir}/docs/source" "{toxinidir}/docs/build/html"
sphinx-build -j auto -W -b html "{toxinidir}/docs/source" "{toxinidir}/docs/build/html"
deps=
-rdocs_requirements.txt
skipsdist=True
passenv=
HOME
[testenv:docs-check]
changedir={toxinidir}
basepython=python3.8
setenv=
PYTHONPATH={toxinidir}
commands=
python "{toxinidir}/scripts/build-authors-contributors"
sphinx-build -W -b html "{toxinidir}/docs/source" "{toxinidir}/docs/build/html"
sphinx-build -b doctest "{toxinidir}/docs/source" "{toxinidir}/docs/build/html"
# sphinx-build -b linkcheck "{toxinidir}/docs/source" "{toxinidir}/docs/build/html"
# cat docs/build/html/output.txt
deps=
-rdocs_requirements.txt
skipsdist=True
whitelist_externals=
cat
passenv=
HOME