forked from sunpy/sunpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
125 lines (121 loc) · 5.04 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
116
117
118
119
120
121
122
123
124
125
[tox]
min_version = 4.0
envlist =
py{310,311,312}{,-online}
py310-oldestdeps
py312-devdeps
py312-figure{,-devdeps}
build_docs{,-gallery}
codestyle
base_deps
[testenv]
pypi_filter = file://.test_package_pins.txt
allowlist_externals=
/bin/bash
/usr/bin/bash
# Run the tests in a temporary directory to make sure that we don't import sunpy from the source tree
changedir = .tmp/{envname}
description =
run tests
conda: with the latest conda version of key dependencies
devdeps: with the latest developer version of key dependencies
figure: runs the figure test suite.
oldestdeps: with the oldest supported version of key dependencies
online: that require remote data (as well as the offline ones)
setenv =
MPLBACKEND = agg
SUNPY_SAMPLEDIR = {env:SUNPY_SAMPLEDIR:{toxinidir}/.tox/sample_data/}
PYTEST_COMMAND = pytest -vvv -r fEs --pyargs sunpy --cov-report=xml --cov=sunpy --cov-config={toxinidir}/.coveragerc {toxinidir}/docs
SPHINX_COMMAND = sphinx-build --color -W --keep-going -b html -d _build/.doctrees . _build/html
devdeps,build_docs,online: HOME = {envtmpdir}
PARFIVE_HIDE_PROGRESS = True
NO_VERIFY_HELIO_SSL = 1
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
deps =
# devdeps is intended to be used to install the latest developer version of key dependencies.
devdeps: astropy>=0.0.dev0
devdeps: git+https://github.com/asdf-format/asdf
devdeps: git+https://github.com/astropy/asdf-astropy
devdeps: git+https://github.com/astropy/reproject
devdeps: git+https://github.com/Cadair/parfive
devdeps: git+https://github.com/MAVENSDC/cdflib
devdeps: git+https://github.com/sunpy/mpl-animators
devdeps: matplotlib>=0.0.dev0
devdeps: numpy>=0.0.dev0
devdeps: pandas>=0.0.dev0
devdeps: pluggy>=0.0.dev0
devdeps: pytest>=0.0.dev0
# oldestdeps we pin against to ensure correct versions
oldestdeps: asdf-astropy<0.3.0
oldestdeps: asdf<2.12.0
oldestdeps: astropy<5.3.0
oldestdeps: beautifulsoup4<4.12.0
oldestdeps: cdflib<0.4.5
oldestdeps: dask[array]<2022.6.0
oldestdeps: drms<0.8
oldestdeps: glymur<0.9.2
oldestdeps: h5netcdf<1.1.0
oldestdeps: matplotlib<3.6.0
oldestdeps: numpy<1.22.0
oldestdeps: opencv-python<4.7.0.68
oldestdeps: pandas<1.5.0
oldestdeps: parfive<2.1.0
oldestdeps: pytest-xdist<3.1
oldestdeps: pytest<7.2
oldestdeps: python-dateutil<2.9.0
oldestdeps: scikit-image<0.20.0; platform_system!='Darwin' or platform_machine!='arm64'
# scikit-image 0.20 is the first with wheels for macOS arm64
oldestdeps: scikit-image<0.21.0; platform_system=='Darwin' and platform_machine=='arm64'
oldestdeps: scipy<1.9.0
oldestdeps: tqdm<4.65.0
oldestdeps: zeep<4.2.0
# Figure tests need a tightly controlled environment
figure-!devdeps: astropy==6.0.0
figure-!devdeps: matplotlib==3.8.2
figure-!devdeps: mpl-animators==1.1.1
# Due to https://github.com/matplotlib/pytest-mpl/issues/216
# Needs a release of pytest-mpl with the fix
figure: pluggy<1.4
extras =
all
tests
commands =
pip freeze --all --no-input
oldestdeps: python -c "import astropy.time; astropy.time.update_leap_seconds()"
!online-!figure: {env:PYTEST_COMMAND} {posargs}
online: {env:PYTEST_COMMAND} --hypothesis-show-statistics --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 sunpy.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/sunpy-master/figures/{envname}/ {posargs}
[testenv:build_docs{,-gallery}]
changedir = docs
description = Invoke sphinx-build to build the HTML docs
extras =
all
docs
gallery: docs-gallery
commands =
pip freeze --all --no-input
gallery: {env:SPHINX_COMMAND} {posargs}
!gallery: {env:SPHINX_COMMAND} -D plot_gallery=0 {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
[testenv:base_deps]
description = Check the test suite does not fail if all optional dependencies are missing
extras =
deps =
astropy
numpy
parfive[ftp]
commands =
python -c "import sunpy; sunpy.self_test()"