File: tox.ini

package info (click to toggle)
mpl-animators 1.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 360 kB
  • sloc: python: 1,386; makefile: 18
file content (96 lines) | stat: -rw-r--r-- 3,576 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
[tox]
min_version = 4.0
requires =
    tox-pypi-filter>=0.14
envlist =
    py{310,311,312,313}-{figure}
    py313-devdeps
    py310-oldestdeps
    codestyle
    build_docs
    codestyle

[testenv]
pypi_filter = https://raw.githubusercontent.com/sunpy/sunpy/main/.test_package_pins.txt
# Run the tests in a temporary directory to make sure that we don't import
# the package from the source tree
change_dir = .tmp/{envname}
description =
    run tests
    figure: with figure tests
    oldestdeps: with the oldest supported version of key dependencies
    devdeps: with the latest developer version of key dependencies
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
set_env =
    MPLBACKEND = agg
    devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
allowlist_externals = /bin/sh
deps =
    # For packages which publish nightly wheels this will pull the latest nightly
    devdeps: astropy>=0.0.dev0
    devdeps: sunpy>=0.0.dev0
    devdeps: matplotlib>=0.0.dev0
    # Packages without nightly wheels will be built from source like this
    # devdeps: git+https://github.com/ndcube/ndcube
    # Figure tests need a tightly controlled environment
    figure-!devdeps-!oldestdeps: astropy==6.1.1
    figure-!devdeps-!oldestdeps: matplotlib==3.9.1
    oldestdeps: minimum_dependencies
# The following indicates which extras_require will be installed
extras =
    all
    tests
commands_pre =
    oldestdeps: minimum_dependencies mpl_animators --extras wcs --filename requirements-min.txt
    oldestdeps: pip install -r requirements-min.txt
    pip freeze --all --no-input
commands =
    # To amend the pytest command for different factors you can add a line
    # which starts with a factor like `online: --remote-data=any \`
    # If you have no factors which require different commands this is all you need:
    !figure: {env:PYTEST_COMMAND} {posargs}
    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 mpl_animators.tests.helpers as h; print(h.get_hash_library_name())"
    pytest \
    -vvv \
    -r fEs \
    --pyargs mpl_animators \
    --cov-report=xml \
    --cov=mpl_animators \
    --cov-config={toxinidir}/.coveragerc \
    figure: -m "mpl_image_compare" \
    figure: --mpl \
    figure: --mpl-generate-summary=html \
    figure: --mpl-baseline-path=https://raw.githubusercontent.com/sunpy/sunpy-figure-tests/mpl-animators-main/figures/{envname}/ \
    {toxinidir}/docs \
    {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:build_docs]
description = invoke sphinx-build to build the HTML docs
change_dir =
    docs
extras =
    all
    docs
commands =
    sphinx-build -j auto --color -W --keep-going -b html -d _build/.doctrees . _build/html {posargs}