-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
tox.ini
91 lines (87 loc) · 3.15 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
[tox]
min_version = 4.0
envlist =
py{310,311,312}{,-oldestdeps,-devdeps,-online,-figure,-conda}
build_docs
codestyle
requires =
tox-pypi-filter
[testenv]
pypi_filter = https://raw.githubusercontent.com/sunpy/sunpy/main/.test_package_pins.txt
allowlist_externals=
/bin/bash
/usr/bin/bash
changedir = .tmp/{envname}
description =
run tests
devdeps: with the latest developer version of key dependencies
oldestdeps: with the oldest supported version of key dependencies
online: that require remote data
setenv =
MPLBACKEND = agg
COLUMNS = 180
PYTEST_COMMAND = pytest -vvv -r fEs --pyargs sunkit_image --cov-report=xml --cov=sunkit_image --cov-config={toxinidir}/.coveragerc {toxinidir}/docs
SUNPY_SAMPLEDIR = {env:SUNPY_SAMPLEDIR:{toxinidir}/.tox/{envname}/sample_data/}
deps =
devdeps: git+https://github.com/scikit-image/scikit-image.git
devdeps: git+https://github.com/sunpy/sunpy.git
oldestdeps: sunpy<6.0
oldestdeps: scikit-image<0.20.0
oldestdeps: scipy<1.19.0
oldestdeps: numpy<1.23.0
figure-!devdeps: astropy==6.1.0
figure-!devdeps: matplotlib==3.9.0
figure-!devdeps: sunpy==5.1.3
pytest-cov
pytest-xdist
extras =
all
tests
commands =
!figure: pip freeze --all --no-input
# We have online figure tests we don't want to run.
!online-!figure: {env:PYTEST_COMMAND} {posargs}
online: {env:PYTEST_COMMAND} --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 --all --no-input >> ./figure_test_images/figure_version_info.txt"
figure: /bin/bash -c "cat ./figure_test_images/figure_version_info.txt"
figure: python -c "import sunkit_image.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/sunkit-image-main/figures/{envname}/ {posargs}
[testenv:build_docs]
changedir = docs
description = Invoke sphinx-build to build the HTML docs
extras =
all
docs
commands =
pip uninstall -y pytest
pip freeze --all --no-input
sphinx-build --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 auto --all-files --show-diff-on-failure
# Requires tox-conda
[testenv:conda]
requires = tox-conda
pypi_filter =
extras =
deps =
conda_deps =
astropy
matplotlib
numpy
scikit-image
scipy
sunpy
conda_channels = conda-forge
install_command = pip install --no-deps {opts} {packages}
commands =
conda list
{env:PYTEST_COMMAND} {posargs}