forked from SOFIA-USRA/sofia_redux
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtox.ini
More file actions
113 lines (106 loc) · 2.8 KB
/
Copy pathtox.ini
File metadata and controls
113 lines (106 loc) · 2.8 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
[tox]
envlist =
check-{style,security}
test{,-oldestdeps,-alldeps}{,-pyargs,-warnings,-cov,-small}{,-xdist}
build-docs
build-docs-pdfusermanual-{exes,fifils,flitecam,forcast,hawc}
build-dist
# tox environments are constructed with so-called 'factors' (or terms)
# separated by hyphens, e.g. test-oldestdeps-cov. Lines below starting with factor:
# will only take effect if that factor is included in the environment name. To
# see a list of example environments that can be run, along with a description,
# run:
#
# tox -l -v
#
[testenv:check-style]
description = check code style with ruff
skip_install = true
deps =
ruff
commands =
ruff check {posargs:sofia_redux}
[testenv:check-security]
description = run bandit to check security compliance
skip_install = true
deps =
bandit>=1.7
commands =
bandit -r -ll -x sofia_redux/*test* -x sofia_redux/*/*test* sofia_redux
[testenv]
description =
run tests
oldestdeps: with the oldest supported version of key dependencies
alldeps: with all optional dependencies
pyargs: with --pyargs on installed package
warnings: treating warnings as errors
cov: with coverage
small: skipping the most resource-intensive tests
basepython =
oldestdeps: python3.11
pass_env =
TOXENV
CI
CODECOV_*
HOME
STRICT_VALIDATION
PASS_INVALID_VALUES
VALIDATE_ON_ASSIGNMENT
USERNAME
setenv =
!alldeps: QT_QPA_PLATFORM = offscreen
xdist: NUMBA_DISABLE_CACHE = 1
extras =
test
alldeps: all
alldeps: test-display
deps =
xdist: pytest-xdist
oldestdeps: -r requirements-min.txt
package =
!pyargs: editable
pyargs: wheel
commands =
pytest --durations=5 \
xdist: -n auto \
cov: --cov=sofia_redux --cov-report=xml --cov-report=html \
!small: --run-slow --run-hugemem \
warnings: -W error \
pyargs: {toxinidir}/docs --pyargs sofia_redux \
{posargs}
[testenv:build-docs]
description = invoke sphinx-build to build the HTML docs
extras =
docs
allowlist_externals =
rm
commands =
rm -rf docs/api docs/_build/html
sphinx-build docs docs/_build/html
rm -rf docs/_build/html/.doctrees
[testenv:build-docs-pdfusermanual-{exes,fifils,flitecam,forcast,hawc}]
description = build the PDF user manual for the selected instrument
extras =
docs
setenv =
exes: INSTRUMENT=exes
fifils: INSTRUMENT=fifils
flitecam: INSTRUMENT=flitecam
forcast: INSTRUMENT=forcast
hawc: INSTRUMENT=hawc
allowlist_externals =
rm
commands =
rm -rf docs/_build/{env:INSTRUMENT}/users
sphinx-build -M latexpdf \
docs/manuals/{env:INSTRUMENT}/users \
docs/_build/{env:INSTRUMENT}/users
[testenv:build-dist]
description = check build sdist/wheel
skip_install = true
allowlist_externals = rm
deps =
build
commands =
rm -rf dist
python -m build