-
Notifications
You must be signed in to change notification settings - Fork 48
/
tox.ini
115 lines (109 loc) · 3.91 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
[tox]
envlist =
check-{style,security}
test{,-dev}{,-oldestdeps,-cov}{-jwst,-romancal,-romanisim,-specutils,-dkist,-ndcube}
docs
requres =
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]
jwst_repo = https://github.com/spacetelescope/jwst.git
romancal_repo = https://github.com/spacetelescope/romancal.git
romanisim_repo = https://github.com/spacetelescope/romanisim.git
specutils_repo = https://github.com/astropy/specutils.git
dkist_repo = https://github.com/DKISTDC/dkist.git
ndcube_repo = https://github.com/sunpy/ndcube.git
[testenv:check-style]
description = check code style, e.g. with flake8
skip_install = true
deps =
flake8
commands =
flake8 . {posargs}
[testenv:check-security]
description = run bandit to check security compliance
skip_install = true
deps =
bandit>=1.7
commands =
bandit -r -ll -c .bandit.yaml gwcs
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
sphinx-build -W docs docs/_build
[testenv]
description =
run tests
jwst: of JWST pipeline
romancal: of Romancal pipeline
romanisim: of Romanisim image simulation
specutils: of Specutils
dkist: of DKIST
ndcube: of NDCube
dev: with the latest developer version of key dependencies
oldestdeps: with the oldest supported version of key dependencies
cov: with coverage
xdist: using parallel processing
allowlist_externals =
jwst,romancal,romanisim,specutils,dkist,ndcube: git
pass_env =
HOME
GITHUB_*
TOXENV
CI
CODECOV_*
DISPLAY
jwst,romancal: CRDS_*
romanisim,romancal: WEBBPSF_PATH
romanisim: GALSIM_CAT_PATH
romanisim: FFTW_DIR
romanisim: LIBRARY_PATH
set_env =
dev: UV_INDEX = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
dev: UV_INDEX_STRATEGY = unsafe-any-match
change_dir =
jwst,romancal,romanisim,specutils,dkist,ndcube: {env_tmp_dir}
extras =
test
alldeps: all
uv_resolution =
oldestdeps: lowest-direct
deps =
xdist: pytest-xdist
cov: pytest-cov
jwst: jwst[test] @ git+{[main]jwst_repo}
romancal: romancal[test] @ git+{[main]romancal_repo}
romanisim: romanisim[test] @ git+{[main]romanisim_repo}
specutils: specutils[test] @ git+{[main]specutils_repo}
dkist: dkist[tests] @ git+{[main]dkist_repo}
ndcube: ndcube[dev] @ git+{[main]ndcube_repo}
dev: -r requirements-dev.txt
commands_pre =
{list_dependencies_command}
jwst: git clone -n --depth=1 --filter=blob:none {[main]jwst_repo} target_repo
romancal: git clone -n --depth=1 --filter=blob:none {[main]romancal_repo} target_repo
romanisim: git clone -n --depth=1 --filter=blob:none {[main]romanisim_repo} target_repo
specutils: git clone -n --depth=1 --filter=blob:none {[main]specutils_repo} target_repo
dkist: git clone -n --depth=1 --filter=blob:none {[main]dkist_repo} target_repo
ndcube: git clone -n --depth=1 --filter=blob:none {[main]ndcube_repo} target_repo
jwst,romancal,romanisim,specutils,dkist,ndcube: git --git-dir={env_tmp_dir}/target_repo/.git checkout HEAD pyproject.toml
commands =
pytest \
jwst,romancal,romanisim,specutils,dkist,ndcube: --config-file={env_tmp_dir}/pyproject.toml --pyargs \
jwst: jwst --ignore-glob=timeconversion --ignore-glob=associations --ignore-glob=scripts --show-capture=no \
romancal: romancal \
romanisim: romanisim \
specutils: specutils \
dkist: dkist --benchmark-skip \
ndcube: ndcube \
xdist: -n auto \
cov: --cov=. --cov-config=pyproject.toml --cov-report=term-missing --cov-report=xml \
{posargs}