File: tox.ini

package info (click to toggle)
gwcs 1.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,404 kB
  • sloc: python: 9,779; makefile: 122
file content (111 lines) | stat: -rw-r--r-- 3,977 bytes parent folder | download
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
[tox]
envlist =
    check-{style,security}
    test{,-dev}{,-oldestdeps,-cov}{-jwst,-romancal,-romanisim,-specutils,-dkist,-ndcube}
    docs
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]
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 = 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: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
    CC
    LOCALE_ARCHIVE
    LC_ALL
    jwst,romancal,romanisim: CRDS_*
    romanisim,romancal: STPSF_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}