-
Notifications
You must be signed in to change notification settings - Fork 22
/
tox.ini
72 lines (67 loc) · 2.11 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
[tox]
envlist =
check-{style,build}
test-xdist{,-cov,-devdeps}
build-{docs,dist}
requires =
tox-uv
[main]
roman_datamodels_repo = https://github.com/spacetelescope/roman_datamodels.git
[testenv:check-style]
description = Run all style and file checks with pre-commit
skip_install = true
deps =
pre-commit
commands =
pre-commit install-hooks
pre-commit run {posargs:--color always --all-files --show-diff-on-failure}
[testenv]
description =
run tests
cov: with coverage
xdist: using parallel processing
devdeps: Run with select dev dependencies
oldestdeps: Run with oldest direct dependencies
allowlist_externals =
roman_datamodels: git
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 =
xdist: pytest-xdist>=3
cov: pytest-cov
devdeps: pyerfa>=0.0.dev0
devdeps: numpy>=0.0.dev0
devdeps: astropy>=0.0.dev0
roman_datamodels: roman_datamodels[test] @ git+{[main]roman_datamodels_repo}
change_dir =
roman_datamodels: {env_tmp_dir}
commands_pre =
oldestdeps: minimum_dependencies
oldestdeps: uv pip install -r {env_tmp_dir}/requirements-min.txt
{list_dependencies_command}
roman_datamodels: git clone -n --depth=1 --filter=blob:none {[main]roman_datamodels_repo}
roman_datamodels: git --git-dir={env_tmp_dir}/roman_datamodels/.git checkout HEAD pyproject.toml
roman_datamodels: git --git-dir={env_tmp_dir}/roman_datamodels/.git checkout HEAD tests/*
commands =
pytest \
roman_datamodels: --config-file={env_tmp_dir}/pyproject.toml tests \
xdist: -n auto \
cov: --cov --cov-report=term-missing --cov-report=xml \
{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