| 1 |
[tox] |
| 2 |
envlist = |
| 3 |
py{310,311,312}-test{,-alldeps,-devdeps}{,-cov} |
| 4 |
py{310,311,312}-test-numpy{123,124,125} |
| 5 |
py{310,311,312}-test-astropy{lts,53,60} |
| 6 |
build_docs |
| 7 |
linkcheck |
| 8 |
codestyle |
| 9 |
requires = |
| 10 |
setuptools >= 30.3.0 |
| 11 |
pip >= 19.3.1 |
| 12 |
isolated_build = true |
| 13 |
indexserver = |
| 14 |
NIGHTLY = https://pypi.anaconda.org/scipy-wheels-nightly/simple |
| 15 |
|
| 16 |
[testenv] |
| 17 |
# Suppress display of matplotlib plots generated during docs build |
| 18 |
setenv = MPLBACKEND=agg |
| 19 |
|
| 20 |
# Pass through the following environment variables which may be needed for the CI |
| 21 |
passenv = HOME, WINDIR, LC_ALL, LC_CTYPE, CC, CI, TRAVIS |
| 22 |
|
| 23 |
# Run the tests in a temporary directory to make sure that we don't import |
| 24 |
# this package from the source tree |
| 25 |
changedir = .tmp/{envname} |
| 26 |
|
| 27 |
# tox environments are constructed with so-called 'factors' (or terms) |
| 28 |
# separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor: |
| 29 |
# will only take effect if that factor is included in the environment name. To |
| 30 |
# see a list of example environments that can be run, along with a description, |
| 31 |
# run: |
| 32 |
# |
| 33 |
# tox -l -v |
| 34 |
# |
| 35 |
description = |
| 36 |
run tests |
| 37 |
alldeps: with all optional dependencies |
| 38 |
devdeps: with the latest developer version of key dependencies |
| 39 |
oldestdeps: with the oldest supported version of key dependencies |
| 40 |
cov: and test coverage |
| 41 |
numpy116: with numpy 1.16.* |
| 42 |
numpy117: with numpy 1.17.* |
| 43 |
numpy118: with numpy 1.18.* |
| 44 |
astropy30: with astropy 3.0.* |
| 45 |
astropy40: with astropy 4.0.* |
| 46 |
astropylts: with the latest astropy LTS |
| 47 |
astropy41: with astropy 4.1.* |
| 48 |
astropy42: with astropy 4.2.* |
| 49 |
|
| 50 |
# The following provides some specific pinnings for key packages |
| 51 |
deps = |
| 52 |
|
| 53 |
cov: coverage |
| 54 |
numpy116: numpy==1.16.* |
| 55 |
numpy117: numpy==1.17.* |
| 56 |
numpy118: numpy==1.18.* |
| 57 |
numpy119: numpy==1.19.* |
| 58 |
|
| 59 |
astropy30: astropy==3.0.* |
| 60 |
astropy40: astropy==4.0.* |
| 61 |
astropylts: astropy==4.0.* |
| 62 |
astropy41: astropy==4.1.* |
| 63 |
astropy42: astropy==4.2.* |
| 64 |
|
| 65 |
devdeps: numpy>=0.0.dev0 |
| 66 |
devdeps: git+https://github.com/astropy/astropy.git#egg=astropy |
| 67 |
|
| 68 |
# The following indicates which extras_require from setup.cfg will be installed |
| 69 |
extras = |
| 70 |
test |
| 71 |
alldeps: all |
| 72 |
|
| 73 |
commands = |
| 74 |
pip freeze |
| 75 |
!cov: pytest --pyargs astroplan {toxinidir}/docs {posargs} |
| 76 |
cov: pytest --pyargs astroplan {toxinidir}/docs --cov astroplan --cov-config={toxinidir}/setup.cfg {posargs} |
| 77 |
cov: coverage xml -o {toxinidir}/coverage.xml |
| 78 |
|
| 79 |
[testenv:build_docs] |
| 80 |
changedir = docs |
| 81 |
description = invoke sphinx-build to build the HTML docs |
| 82 |
extras = docs |
| 83 |
commands = |
| 84 |
pip freeze |
| 85 |
sphinx-build -W -b html . _build/html |
| 86 |
|
| 87 |
[testenv:linkcheck] |
| 88 |
changedir = docs |
| 89 |
description = check the links in the HTML docs |
| 90 |
extras = docs |
| 91 |
commands = |
| 92 |
pip freeze |
| 93 |
sphinx-build -W -b linkcheck . _build/html |
| 94 |
|
| 95 |
[testenv:codestyle] |
| 96 |
skip_install = true |
| 97 |
changedir = . |
| 98 |
description = check code style, e.g. with flake8 |
| 99 |
deps = flake8 |
| 100 |
commands = flake8 astroplan --count --max-line-length=100 |