-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtox.ini
More file actions
120 lines (111 loc) · 3.34 KB
/
tox.ini
File metadata and controls
120 lines (111 loc) · 3.34 KB
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
#
# Setup and manage Python virtual environments that allow users to develop and
# test the Taweret Python package.
#
[tox]
requires = tox>=4
env_list =
[testenv]
description = Run the Taweret full test suite
passenv =
COVERAGE_FILE
COVERAGE_XML
COVERAGE_HTML
setenv =
COV_FILE = {env:COVERAGE_FILE:.coverage_taweret}
COV_XML = {env:COVERAGE_XML:coverage.xml}
COV_HTML = {env:COVERAGE_HTML:htmlcov}
DOC_ROOT = docs
BOOK_ROOT = book
deps =
coverage: coverage
usedevelop =
coverage: true
nocoverage: false
commands =
nocoverage: python -m pytest .
coverage: coverage run --data-file={env:COV_FILE} -m pytest .
[testenv:oldest]
# IMPORTANT
# Please make sure that Python and package version info here are consistent with
# same information in pyproject.toml, etc.
#
# Use the oldest Python version allowed by package with the oldest dependencies
# allowed. This is obviously not exhaustive testing since, for example, we do
# not confirm that the oldest dependencies are compatible with the newest Python
# version supported by the package.
description = Test with all oldest allowable versions
basepython = py310
deps =
numpy==1.21.1
scipy==1.10.0
bilby==2.5.0
usedevelop = true
commands =
python -m pip list
python -c 'import numpy ; exit(numpy.__version__ != "1.21.1")'
python -c 'import scipy ; exit(scipy.__version__ != "1.10.0")'
python -c 'import bilby ; exit(bilby.__version__ != "2.5.0")'
python -m pytest .
[testenv:report]
description = Generate XML-/HTML-format coverage report
depends = coverage
deps = coverage
skip_install = true
commands =
coverage report --data-file={env:COV_FILE}
coverage xml --data-file={env:COV_FILE} -o {env:COV_XML}
coverage html --data-file={env:COV_FILE} -d {env:COV_HTML}
[testenv:check]
# This should only *report* issues. It should *not* alter any files.
description = Run code quality checks
deps =
flake8
commands =
flake8 --config={toxinidir}/.flake8
[testenv:html]
description = Generate the Taweret documentation in HTML format
deps =
ipython
Pygments
sphinx
sphinxcontrib-bibtex
sphinx_rtd_theme
commands =
sphinx-build --version
sphinx-build -E --fail-on-warning -b html {env:DOC_ROOT}/source {env:DOC_ROOT}/build_html
[testenv:pdf]
description = Generate the Taweret documentation as a PDF file
deps =
ipython
Pygments
sphinx
sphinxcontrib-bibtex
allowlist_externals = make
commands =
sphinx-build --version
sphinx-build -E -b latex {env:DOC_ROOT}/source {env:DOC_ROOT}/build_pdf
make -C {env:DOC_ROOT}/build_pdf
[testenv:book]
# This is a conservative build of the book from scratch each time. This should
# be used for official builds and testing.
description = Generate Taweret examples in jupyterbook
deps =
ptemcee
seaborn
jupyter-book<2.0.0 # last version using Sphinx
commands =
jupyter-book clean --all {env:BOOK_ROOT}
jupyter-book build --all --warningiserror {env:BOOK_ROOT}
[testenv:bookdev]
# Potentially quicker builds for interactive development of book content.
#
# NOTE: The configuration of this task can let warnings and failures slip
# through the cracks.
description = Regenerate Taweret jupyterbook as it is developed
deps =
ptemcee
seaborn
jupyter-book<2.0.0 # last version using Sphinx
commands =
jupyter-book build {env:BOOK_ROOT}