Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
177 lines (172 loc) · 5.96 KB
/
Copy pathtox.ini
File metadata and controls
177 lines (172 loc) · 5.96 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
[tox]
min_version = 4.0
requires =
tox-pypi-filter>=0.14
envlist =
py{312,313,314}{,-online,-minimal}
py313-minimal-noana
py{314,314t}-devdeps{,-minimal}
py312-oldestdeps
codestyle
build_docs{,-gallery}
py312-figure{,-devdeps}
core_deps
linkcheck
[testenv]
pypi_filter = file://{toxinidir}/.test_package_pins.txt
allowlist_externals=
/bin/sh
# 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)
reportlog: runs with --report-log pytest-log.jsonl for creating issues from cron runs
noana: Skip building the ANA C extension
pass_env =
# A variable to tell tests we are on a CI system
CI
# Custom compiler locations (such as ccache)
CC
# Location of locales (needed by sphinx on some systems)
LOCALE_ARCHIVE
# If the user has set a LC override we should follow it
LC_ALL
# Needed for building Rust-based dependencies
RUSTUP_TOOLCHAIN
set_env =
COVERAGE_FILE = {toxinidir}/.coverage
MPLBACKEND = agg
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple https://pypi.anaconda.org/liberfa/simple
SUNPY_SAMPLEDIR = {env:SUNPY_SAMPLEDIR:{toxinidir}/.tox/sample_data/}
devdeps,build_docs,online: HOME = {envtmpdir}
noana: SUNPY_NO_BUILD_ANA_EXTENSION=1
PARFIVE_HIDE_PROGRESS = True
NO_VERIFY_HELIO_SSL = 1
py314t: PYTHON_GIL = 0
deps =
# Avoid adding this to the pyproject.toml as a dependency
pytest-xdist
# devdeps is intended to be used to install the latest developer version of key dependencies.
# For packages which publish nightly wheels this will pull the latest nightly
devdeps: astropy>=0.0.dev0
devdeps: matplotlib>=0.0.dev0
devdeps: numpy>=0.0.dev0
devdeps: pandas>=0.0.dev0
devdeps: pluggy>=0.0.dev0
devdeps: pyerfa>=0.0.dev0
devdeps: pytest>=0.0.dev0
devdeps: scikit-image>=0.0.dev0
devdeps: reproject>=0.0.dev0
# Packages without nightly wheels will be built from source like this
devdeps: git+https://github.com/asdf-format/asdf
devdeps: git+https://github.com/astropy/asdf-astropy
devdeps: git+https://github.com/Cadair/parfive
devdeps: git+https://github.com/MAVENSDC/cdflib
devdeps: git+https://github.com/sunpy/mpl-animators
# Handle minimum dependencies via minimum_dependencies
oldestdeps: minimum_dependencies
# Figure tests need a tightly controlled environment
figure-!devdeps: astropy==7.2.0
figure-!devdeps: matplotlib==3.10.0
figure-!devdeps: mpl-animators==1.2.1
# Remove this pin on numpy when the above astropy pin is >=7.2.1
figure-!devdeps: numpy<2.5
# Use pytest-reportlog
reportlog: pytest-reportlog
extras =
!minimal: tests
minimal: core
minimal: tests-only
py314t: asdf
# py314t: jpeg2000
# py314t: opencv
py314t: spice
py314t: scikit-image
py314t: s3
py314t: asdf-tests
py314t: jupyter
commands_pre =
oldestdeps: minimum_dependencies sunpy --extras asdf dask image jpeg2000 map opencv net scikit-image spice timeseries visualization tests-only --filename requirements-min.txt
oldestdeps: pip install -r requirements-min.txt
oldestdeps: python -c "import astropy.time; astropy.time.update_leap_seconds()"
pip freeze --all --no-input
commands =
figure: /bin/sh -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/sh -c "pip freeze >> ./figure_test_images/figure_version_info.txt"
figure: /bin/sh -c "cat ./figure_test_images/figure_version_info.txt"
figure: python -c "import sunpy.tests.helpers as h; print(h.get_hash_library_name())"
pytest \
-vvv \
-r fEs \
--pyargs sunpy \
--cov-report=xml \
--cov=sunpy \
--cov-config={toxinidir}/.coveragerc \
{toxinidir}/docs \
online: --hypothesis-show-statistics \
online: --remote-data=any \
figure: -m "mpl_image_compare" \
figure: --mpl \
figure: --remote-data=any \
figure: --mpl-generate-summary=html \
figure: --mpl-baseline-path=https://raw.githubusercontent.com/sunpy/sunpy-figure-tests/sunpy-main/figures/{envname}/ \
reportlog: --report-log pytest-log.jsonl
{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
sphinx-build \
-j auto \
--color \
-W \
--keep-going \
-b html \
-d _build/.doctrees \
. \
_build/html \
!gallery: -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:linkcheck]
changedir = docs
description = Invoke sphinx-build to check the URLS within the docs
extras =
all
docs
commands =
pip freeze --all --no-input
sphinx-build \
-qqq \
--color \
-b linkcheck \
-D plot_gallery=0 \
. \
_build/html \
{posargs}
[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:coordinates]
description = Run sunpy.coordinates specific tests with full functionality
commands =
pytest \
--pyargs sunpy.coordinates \
--remote-data=any \
{posargs}