-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtox.ini
More file actions
55 lines (39 loc) · 1.93 KB
/
tox.ini
File metadata and controls
55 lines (39 loc) · 1.93 KB
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]
envlist =
py{311, 312, 313}-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
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
-rrequirements.txt
#-rsite_requirements.txt
#-r.binder/requirements.txt
# Notebooks may set minimums for some dependencies, the others are set for a supported minimum
# following e.g. SPEC0 or some other considerations.
oldestdeps: numpy==1.24.0
oldestdeps: matplotlib==3.7.0
# TODO: add pure python dependency, so we can add an example for the github install
devdeps: git+https://github.com/astropy/pyvo.git#egg=pyvo
allowlist_externals = bash, sed, make
commands =
pip freeze
## Some of the these could be factored out to a separate shell script,
## but so far it's simple enought to keep it here.
# 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: bash test.sh
buildhtml: make html
# SED magic to remove the toctree captions from the rendered index page while keeping them in the sidebar TOC
# This should live upstream, clean up once supported in the JB ecosystem
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