-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtox.ini
68 lines (53 loc) · 2.98 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
[tox]
envlist =
py{310, 311, 312, 313}-test{,-oldestdeps,-devdeps,-predeps}{,-buildhtml}
requires =
pip >= 19.3.1
[testenv]
description = run tests
setenv =
FIREFLY_URL = https://irsa.ipac.caltech.edu/irsaviewer # fallback url for firefly notebooks if not defined in code
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple https://pypi.anaconda.org/astropy/simple
passenv = CI, CIRCLECI, GITHUB_EVENT_NAME, GITHUB_EVENT_PATH
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
-r.binder/requirements.txt
# Notebooks sets minimums for photutils, astroquery, sep, pyvo, pandas;
# the rest is indirect minimums for those
oldestdeps: numpy==1.24.0
oldestdeps: matplotlib==3.7.0
oldestdeps: scipy==1.10.0
oldestdeps: astropy==5.3.0
oldestdeps: photutils==2.0.0
oldestdeps: astroquery==0.4.10
oldestdeps: firefly_client==3.2.0
oldestdeps: sep==1.4.0
oldestdeps: pyvo==1.5.0
oldestdeps: pandas==1.5.2
devdeps: astropy>0.0.dev0
devdeps: git+https://github.com/astropy/pyvo.git#egg=pyvo
devdeps: git+https://github.com/astropy/astroquery.git#egg=astroquery
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'
# ray is not yet python 3.13 compatible
!buildhtml: bash -c 'if python -c "import sys; print(sys.version)" | grep 3.13; then echo Parallelize_Convolution.md >> ignore_testing; fi'
!buildhtml: bash -c 'if [[ $CI == true ]]; then cat ignore_gha_testing >> ignore_testing; fi'
# We only want to run CI in PRs for the notebooks we touched
!buildhtml: bash -c 'if [[ $GITHUB_EVENT_NAME == pull_request && -z "$(grep force_run:all_tests ${GITHUB_EVENT_PATH})" ]]; then git fetch origin main --depth=1; git diff origin/main --name-only tutorials | grep .md; else find tutorials -name "*.md"; fi | grep -vf ignore_testing | xargs jupytext --to notebook '
!buildhtml: pytest --nbval-lax -vv --suppress-no-test-exit-code --durations=10 tutorials
buildhtml: sphinx-build -b html . _build/html -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