forked from spacetelescope/rad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
72 lines (69 loc) · 2.54 KB
/
tox.ini
File metadata and controls
72 lines (69 loc) · 2.54 KB
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 =
py3{,11,12}{,-cov,-devdeps}{,-xdist}
requires =
tox-uv
[main]
roman_datamodels_repo = https://github.com/spacetelescope/roman_datamodels.git
romancal_repo = https://github.com/spacetelescope/romancal.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
romancal: git
set_env =
devdeps: UV_INDEX = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
devdeps: UV_INDEX_STRATEGY = unsafe-any-match
romancal: CRDS_SERVER_URL = https://roman-crds.stsci.edu
romancal: CRDS_PATH = /tmp/crds_cache
romancal: CRDS_CLIENT_RETRY_COUNT = 3
romancal: CRDS_CLIENT_RETRY_DELAY_SECONDS = 20
extras =
test
use_develop =
!cov: false
# The "test_latest" tests require an editable install (or else they will
# be silently skipped). Use the coverage run for these tests so that extra
# jobs are not needed for full testing.
cov: true
uv_resolution =
oldestdeps: lowest-direct
deps =
xdist: pytest-xdist>=3
cov: pytest-cov
devdeps: numpy>=0.0.dev0
devdeps: astropy>=0.0.dev0
roman_datamodels: roman_datamodels[test] @ git+{[main]roman_datamodels_repo}
romancal: romancal[test] @ git+{[main]romancal_repo}
oldestdeps: minimum_dependencies
change_dir =
roman_datamodels: {env_tmp_dir}
romancal: {env_tmp_dir}
commands_pre =
oldestdeps: minimum_dependencies rad --filename {env_tmp_dir}/requirements-min.txt
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/*
romancal: git clone --depth=1 {[main]romancal_repo}
commands =
pytest \
roman_datamodels: --config-file={env_tmp_dir}/pyproject.toml tests \
romancal: --config-file=romancal/pyproject.toml romancal \
xdist: -n auto \
cov: --cov --cov-report=term-missing --cov-report=xml \
{posargs}