forked from Caltech-IPAC/irsa-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
53 lines (40 loc) · 2.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
[tox]
envlist =
py{38,39,310}-test{,-oldestdeps,-devdeps,-predeps}{,-buildhtml}
requires =
pip >= 19.3.1
[testenv]
description = run tests
setenv =
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple https://pypi.anaconda.org/astropy/simple
passenv = CI, CIRCLECI
deps =
# We use these files to specify all the dependencies, and below we override
# versions for specific testing schenarios
-rtest_requirements.txt
-rsite_requirements.txt
-rtutorials/requirements.txt
# TODO: add the oldest supported versions of all the dependencies here
# oldestdeps: numpy==1.18
# oldestdeps: matplotlib==3.1.2
# oldestdeps: scipy==1.4
devdeps: astropy>0.0.dev0
devdeps: git+https://github.com/astropy/pyvo.git#egg=pyvo
allowlist_externals = bash, sed
commands =
pip freeze
# Ignore testing the tutorials listed in ignore_testing file. We have some OS specific ignores,
# too due to issues with e.g. multiprocessing and problems in upstream dependency
!buildhtml: bash -c 'if python -c "import platform; print(platform.platform())" | grep -i macos; then cat ignore_osx_testing >> ignore_testing; fi'
!buildhtml: bash -c 'if python -c "import platform; print(platform.platform())" | grep -i win; then cat ignore_windows_testing >> ignore_testing; fi'
!buildhtml: bash -c 'if [[ $CI == true ]]; then cat ignore_gha_testing >> ignore_testing; fi'
!buildhtml: bash -c 'find tutorials -name "*.md" | grep -vf ignore_testing | xargs jupytext --to notebook '
!buildhtml: pytest --nbval-lax -vv --durations=10 tutorials
buildhtml: sphinx-build -b html . _build/html -D nb_execution_mode=auto -nWT --keep-going
# SED magic to remove the toctree captions from the rendered index page while keeping them in the sidebar TOC
buildhtml: sed -E -i.bak '/caption-text/{N; s/.+caption-text.+\n<ul>/<ul>/; P;D;}' _build/html/index.html
buildhtml: bash -c 'rm _build/html/index.html.bak'
pip_pre =
predeps: true
!predeps: false
skip_install = true