forked from sunpy/ndcube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
114 lines (110 loc) · 4.1 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
[tox]
min_version = 4.0
envlist =
py{39,310,311}{,-devdeps,-online,-figure,-conda,-oldestdeps}
build_docs
codestyle
[testenv]
pypi_filter = https://raw.githubusercontent.com/sunpy/sunpy/main/.test_package_pins.txt
# We use bash in some of our environments so we have to whitelist it.
allowlist_externals=
/bin/bash
/usr/bin/bash
# Run the tests in a temporary directory to make sure that we don't import ndcube from the source tree
changedir = .tmp/{envname}
description =
run tests
devdeps: with the latest developer version of key dependencies
online: that require remote data (as well as the offline ones)
figure: runs the figure test suite.
setenv =
MPLBACKEND = agg
COLUMNS = 180
PYTEST_COMMAND = pytest -vvv -s -raR --pyargs ndcube --cov-report=xml --cov=ndcube --cov-config={toxinidir}/setup.cfg {toxinidir}/docs
PARFIVE_HIDE_PROGESS = True
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
passenv =
HTTP_PROXY
HTTPS_PROXY
NO_PROXY
CIRCLECI
deps =
# The devdeps factor is intended to be used to install the latest developer version.
# of key dependencies.
# Astropy is installed from the nightly wheels
devdeps: astropy>=0.0dev0
devdeps: matplotlib>=0.0dev0
devdeps: git+https://github.com/sunpy/sunpy
devdeps: git+https://github.com/sunpy/mpl-animators
devdeps: git+https://github.com/spacetelescope/gwcs
# These are specific online extras we use to run the online tests.
online: pytest-rerunfailures
online: pytest-timeout
# Oldest Dependencies
oldestdeps: sunpy<4.0
oldestdeps: astropy<4.3
oldestdeps: gwcs<0.16
oldestdeps: numpy<1.18
oldestdeps: matplotlib<3.3
oldestdeps: mpl_animators<1.1
oldestdeps: reproject==0.7.1
oldestdeps: scipy<1.8.0
oldestdeps: dask<2021.5.0
# Figure tests need a tightly controlled environment
figure-!devdeps: matplotlib==3.7.2
figure-!devdeps: astropy==5.3.3
figure-!devdeps: mpl-animators==1.0.0
figure-!devdeps: scipy
figure-!devdeps: dask
extras =
all
tests
commands =
!oldestdeps-!online-!hypothesis-!figure: {env:PYTEST_COMMAND} {posargs}
online: {env:PYTEST_COMMAND} --reruns 2 --reruns-delay 15 --timeout=180 --remote-data=any {posargs}
figure: /bin/bash -c "mkdir -p ./figure_test_images; python -c 'import matplotlib as mpl; print(mpl.ft2font.__file__, mpl.ft2font.__freetype_version__, mpl.ft2font.__freetype_build_type__)' > ./figure_test_images/figure_version_info.txt"
figure: /bin/bash -c "pip freeze >> ./figure_test_images/figure_version_info.txt"
figure: /bin/bash -c "cat ./figure_test_images/figure_version_info.txt"
figure: python -c "import ndcube.tests.helpers as h; print(h.get_hash_library_name())"
figure: {env:PYTEST_COMMAND} -m "mpl_image_compare" --mpl --remote-data=any --mpl-generate-summary=html --mpl-baseline-path=https://raw.githubusercontent.com/sunpy/sunpy-figure-tests/ndcube-main/figures/{envname}/ {posargs}
[testenv:build_docs]
changedir = docs
description = Invoke sphinx-build to build the HTML docs
extras =
all
docs
commands =
pip freeze --all --no-input
sphinx-build -j auto --color -W --keep-going -b html -d _build/.doctrees . _build/html {posargs}
python -c 'import pathlib; print("Documentation available under file://\{0\}".format(pathlib.Path(r"{toxinidir}") / "docs" / "_build" / "index.html"))'
[testenv:codestyle]
pypi_filter =
skip_install = true
description = Run all style and file checks with pre-commit
deps =
pre-commit
commands =
pre-commit install-hooks
pre-commit run --color always --all-files --show-diff-on-failure
# This env requires tox-conda.
[testenv:py{39,310,311}-conda]
pypi_filter =
extras =
deps =
conda_deps =
numpy
astropy
matplotlib
gwcs
sunpy
pytest
pytest-mpl
pytest-astropy
reproject
mpl_animators
conda_channels = conda-forge
allowlist_externals = conda
install_command = pip install --no-deps --no-build-isolation {opts} {packages}
commands =
conda list
{env:PYTEST_COMMAND} {posargs}