-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathtox.ini
61 lines (57 loc) · 1.55 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
[tox]
envlist =
test{,-jwst}{,-devdeps}-xdist{,-cov}
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]
allowlist_externals =
jwst: touch
description =
run tests
xdist: using parallel processing
cov: with coverage
pass_env =
CRDS_*
set_env =
cov: COVERAGE_RC_FILE=pyproject.toml
extras =
test
deps =
xdist: pytest-xdist
cov: pytest-cov
jwst: jwst[test] @ git+https://github.com/spacetelescope/jwst.git
package=
cov: editable
!cov: wheel
commands_pre =
devdeps: pip install -r requirements-dev.txt -U --upgrade-strategy eager
pip freeze
# make an empty pytest.ini so jwst tests don't use the settings in pyprojec.toml
jwst: touch pytest.ini
commands =
pytest \
xdist: -n auto \
cov: --cov=src --cov-report=term-missing --cov-report=xml \
jwst: --pyargs jwst --ignore-glob=*/scripts/* \
# TODO: fix bug with `.finalize()` in `jwst.associations`
jwst: --ignore-glob=*/associations/tests/test_dms.py \
{posargs}
[testenv:build-docs]
description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
sphinx-build -W docs docs/_build
[testenv:build-dist]
description = build wheel and sdist
skip_install = true
deps =
build
commands =
python -m build .