forked from spacetelescope/jwst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
116 lines (98 loc) · 2.94 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
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
[tox]
envlist =
py{38,39,310}{,-oldestdeps,-devdeps,-sdpdeps}{,-pyargs}{,-cov}
style
security
isolated_build = true
[testenv]
# tox environments are constructed with so-called 'factors' (or terms)
# separated by hyphens, e.g. test-devdeps-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
#
description =
run tests
devdeps: with the latest developer version of key dependencies
oldestdeps: with the oldest supported version of key dependencies
sdpdeps: with the recent STScI DMS release pinned dependencies
pyargs: with --pyargs on installed package
cov: and test coverage
# The following indicates which extras_require from setup.cfg will be installed
extras = test
# Pass through the following environment variables which may be needed for the CI
passenv =
TOXENV
CI
CODECOV_*
HOME
CRDS_*
STRICT_VALIDATION
PASS_INVALID_VALUES
VALIDATE_ON_ASSIGNMENT
TEST_BIGDATA
usedevelop = true
commands =
!cov: pytest -n auto {posargs}
cov: pytest -n auto --cov-report=xml --cov=. --cov-config=setup.cfg {posargs}
deps =
pytest-xdist
devdeps: -rrequirements-dev.txt
sdpdeps: -rrequirements-sdp.txt
py310: git+https://github.com/pytest-dev/pytest
setenv =
sdpdeps,regtests: CRDS_CONTEXT = jwst-edit
commands_pre =
python -m pip install --upgrade pip
# Generate a requirements-min.txt file
oldestdeps: minimum_deps
# Force install everything in that file
oldestdeps: pip install --ignore-installed -r requirements-min.txt
# Don't treat positional arguments passed to tox as file system paths
args_are_paths = false
[testenv:pyargs]
changedir = {homedir}
usedevelop = false
commands =
pyargs: pytest -n auto {toxinidir}/docs --pyargs {posargs:jwst}
[testenv:regtests]
description = run tests with --bigdata and --slow flags
commands =
pytest -n auto --bigdata --slow --basetemp={homedir}/test_outputs {posargs}
[testenv:twine]
description = check that the package builds sdist/wheel and that twine uploads
deps =
twine>=3.3
pep517
usedevelop = false
commands =
python -m pep517.check .
twine check --strict {distdir}/*
[testenv:style]
description = check code style, e.g. with flake8
skip_install = true
deps =
flake8
commands =
flake8 {posargs}
[testenv:verify-install-requires]
description = verify that install_requires in setup.cfg is correct
extras =
commands =
verify_install_requires
[testenv:warnings]
commands =
pytest -W error {posargs}
[testenv:security]
description = run bandit to check security compliance
deps =
bandit>=1.7
commands =
bandit -r -ll -x jwst/*test*,jwst/**/*test*,jwst/fits_generator jwst scripts
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
sphinx-build -W docs docs/_build