forked from spacetelescope/roman_datamodels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
88 lines (82 loc) · 2.33 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
[tox]
env_list =
check-{style,build}
test{,-devdeps}{,-pyargs,-cov}-xdist
test-numpy{120,121,122}-xdist
build-{docs,dist}
withromancal
# 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]
skip_install = true
description = Run all style and file checks with pre-commit
deps =
pre-commit
commands =
pre-commit install-hooks
pre-commit run {posargs:--color always --all-files --show-diff-on-failure}
[testenv]
description =
run tests
rad: with latest commit of `rad`
oldestdeps: with the oldest supported version of key dependencies
warnings: treating warnings as errors
cov: with coverage
xdist: using parallel processing
pass_env =
CRDS_*
HOME
CI
TOXENV
CODECOV_*
extras =
test
deps =
xdist: pytest-xdist
cov: pytest-cov
oldestdeps: minimum_dependencies
rad: rad @ git+https://github.com/spacetelescope/rad.git@main#egg=rad
commands_pre =
oldestdeps: minimum_dependencies roman_datamodels --filename requirements-min.txt
oldestdeps: pip install -r requirements-min.txt
devdeps: pip install -r requirements-dev.txt -U --upgrade-strategy eager
pip freeze
commands =
pytest \
warnings: -W error \
xdist: -n auto \
cov: --cov=roman_datamodels --cov=tests --cov-config pyproject.toml --cov-report term-missing --cov-report xml \
{posargs}
[testenv:build-docs]
basepython= python3.8
extras= docs
commands=
sphinx-build -W docs build/docs
[testenv:build-dist]
description = build wheel and sdist
skip_install = true
deps =
build
commands =
python -m build .
[testenv:withromancal]
allowlist_externals =
git
bash
deps =
pytest-cov
commands_pre =
bash -c "pip freeze -q | grep 'roman_datamodels @' > {env_tmp_dir}/requirements.txt"
pip install git+https://github.com/spacetelescope/romancal.git
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest tests/test_open.py::test_open_asn \
--cov=tests --cov-config pyproject.toml --cov-report term-missing --cov-report xml \
{posargs}