-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
tox.ini
55 lines (51 loc) · 2.06 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
[tox]
min_version = 4.0
envlist =
build_docs{,-devdeps}
sunpy_docs{,-devdeps}
website{,-devdeps}
[testenv]
allowlist_externals=
/bin/sh
/usr/bin/git
/usr/bin/make
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
SUNPY_SAMPLEDIR = {env:SUNPY_SAMPLEDIR:{toxinidir}/.tox/{envname}/sample_data/}
HIDE_PARFIVE_PROGRESS = True
deps =
devdeps: git+https://github.com/pydata/pydata-sphinx-theme.git
[testenv:build_docs{,-devdeps}]
changedir = docs
description = Invoke sphinx-build to build the HTML docs
extras =
docs
commands =
pip freeze --all --no-input
!gallery: sphinx-build -j auto --color -W --keep-going -b html -d _build/.doctrees . _build/html {posargs}
python -c 'import pathlib; print("Package Docs available under file://\{0\}".format(pathlib.Path(r"{toxinidir}") / "docs" / "_build" / "html" / "index.html"))'
[testenv:sunpy_docs{,-devdeps}]
changedir = .tmp/{envname}
commands =
/bin/sh -c "git -C sunpy pull || git clone https://github.com/sunpy/sunpy"
python -m pip install -v -e "sunpy/.[all,docs]"
pip freeze --all --no-input
sphinx-build --color -b html sunpy/docs sunpy/docs/_build/html -D plot_gallery=0 {posargs}
python -c 'import pathlib; print("Suny Docs available under file://\{0\}".format(pathlib.Path("./sunpy/docs") / "_build" / "html" / "index.html"))'
[testenv:website{,-devdeps}]
changedir = .tmp/{envname}
commands =
/bin/sh -c "git -C sunpy.org pull || git clone --recurse-submodules https://github.com/sunpy/sunpy.org"
python -m pip install -r "sunpy.org/requirements.txt"
pip freeze --all --no-input
sphinx-build --color -b dirhtml sunpy.org/ sunpy.org/_build/html {posargs}
python -c 'import pathlib; print("Website available under file://\{0\}".format(pathlib.Path("./sunpy.org") / "_build" / "html" / "index.html"))'