-
Notifications
You must be signed in to change notification settings - Fork 38
/
tox.ini
82 lines (75 loc) · 2.08 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
[tox]
envlist =
check-{style,security,build}
test{,-warnings,-regtests}{,-cov}{,-xdist}
build-{docs,dist}
# 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
#
[testenv:check-style]
description = check code style, e.g. with flake8
skip_install = true
deps =
ruff
commands =
ruff check . {posargs}
[testenv:check-security]
description = run bandit to check security compliance
skip_install = true
deps =
bandit>=1.7
commands =
bandit -r -l -v -x tests/* drizzlepac
[testenv:check-build]
description = check build sdist/wheel and a strict twine check for metadata
skip_install = true
deps =
twine>=3.3
build
commands =
python -m build .
twine check --strict dist/*
[testenv]
description =
run tests
warnings: treating warnings as errors
regtests: with --bigdata and --slow flags
cov: with coverage
xdist: using parallel processing
devdeps: use unreleased code
package = editable
set_env =
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://anaconda.org/liberfa/pyerfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
deps =
setuptools
xdist: pytest-xdist
cov: pytest-cov
devdeps: -rrequirements-dev.txt
extras =
test
commands_pre =
pip freeze
commands =
pytest -s --basetemp=test_outputs tests \
cov: --cov=. --cov-config=pyproject.toml --cov-report=term-missing --cov-report=xml \
warnings: -W error \
regtests: --bigdata --slow \
xdist: -n auto \
{posargs}
[testenv:build-docs]
description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
[testenv:build-dist]
description = build wheel and sdist
skip_install = true
deps =
build
commands =
python -m build .