-
Notifications
You must be signed in to change notification settings - Fork 21
/
tox.ini
90 lines (85 loc) · 2.67 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
[tox]
env_list =
check-{style,build}
test{,-devdeps}{,-pyargs,-cov}-xdist-withromancal
test-numpy{120,121,122}-xdist
build-{docs,dist}
romancal
requires =
tox-uv
# 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
#
[main]
rcal_repo = https://github.com/spacetelescope/romancal.git
[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
allowlist_externals =
git
pass_env =
CRDS_*
HOME
CI
TOXENV
CODECOV_*
set_env =
devdeps: UV_INDEX = https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
devdeps: UV_INDEX_STRATEGY = unsafe-any-match
extras =
test
uv_resolution =
oldestdeps: lowest-direct
deps =
withromancal: romancal @ git+{[main]rcal_repo}
xdist: pytest-xdist
cov: pytest-cov >= 4.1.0
rad: rad @ git+https://github.com/spacetelescope/rad.git@main#egg=rad
romancal: setuptools # for pkg_resources for pysiaf
romancal: romancal[test] @ git+{[main]rcal_repo}
devdeps: -r requirements-dev.txt
oldestdeps: minimum_dependencies
change_dir =
romancal: {env_tmp_dir}
commands_pre =
oldestdeps: minimum_dependencies roman_datamodels --filename {env_tmp_dir}/requirements-min.txt
oldestdeps: uv pip install -r {env_tmp_dir}/requirements-min.txt
{list_dependencies_command}
romancal: git clone -n --depth=1 --filter=blob:none {[main]rcal_repo}
romancal: git --git-dir={envtmpdir}/romancal/.git checkout HEAD pyproject.toml
commands =
pytest \
romancal: --config-file={env_tmp_dir}/pyproject.toml --pyargs romancal \
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 .