8000 Test sphinx extensions doctests only on Circle. (#8228) · scikit-learn/scikit-learn@fdfdbf0 · GitHub
[go: up one dir, main page]

Skip to content

Commit fdfdbf0

Browse files
lesteveTomDLT
authored andcommitted
Test sphinx extensions doctests only on Circle. (#8228)
Some sphinx extensions import sphinx in their doctests.
1 parent ec8d9f3 commit fdfdbf0

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

build_tools/circle/build_doc.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ then
107107
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh \
108108
-O miniconda.sh
109109
fi
110-
chmod +x miniconda.sh && ./miniconda.sh -b -p $HOME/miniconda
110+
chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH
111111
cd ..
112-
export PATH="$HOME/miniconda/bin:$PATH"
112+
export PATH="$MINICONDA_PATH/bin:$PATH"
113113
conda update --yes --quiet conda
114114
popd
115115

116116
# Configure the conda environment and put it in the path using the
117117
# provided versions
118-
conda create -n testenv --yes --quiet python numpy scipy \
118+
conda create -n $CONDA_ENV_NAME --yes --quiet python numpy scipy \
119119
cython nose coverage matplotlib sphinx pillow
120120
source activate testenv
121121

build_tools/travis/test_script.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ run_tests() {
4141

4242
# Test doc
4343
cd $OLDPWD
44-
make test-doc test-sphinxext
44+
make test-doc
4545
}
4646

4747
if [[ "$RUN_FLAKE8" == "true" ]]; then

circle.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ checkout:
22
post:
33
- ./build_tools/circle/checkout_merge_commit.sh
44

5+
machine:
6+
environment:
7+
MINICONDA_PATH: $HOME/miniconda
8+
CONDA_ENV_NAME: testenv
9+
510
dependencies:
611
cache_directories:
712
- "~/scikit_learn_data"
@@ -12,10 +17,13 @@ dependencies:
1217
override:
1318
- ./build_tools/circle/build_doc.sh:
1419
timeout: 3600 # seconds
20+
1521
test:
1622
override:
17-
# override is needed otherwise nosetests is run by default
18-
- echo "Documentation has been built in the 'dependencies' step. No additional test to run"
23+
- |
24+
export PATH="$MINICONDA_PATH/bin:$PATH"
25+
source activate $CONDA_ENV_NAME
26+
make test-sphinxext
1927
deployment:
2028
push:
2129
branch: /^master$|^[0-9]+\.[0-9]+\.X$/

doc/sphinxext/sphinx_issues.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
"""A Sphinx extension for linking to your project's issue tracker."""
3-
"""
2+
"""A Sphinx extension for linking to your project's issue tracker.
3+
44
Copyright 2014 Steven Loria
55
66
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -22,12 +22,8 @@
2222
THE SOFTWARE.
2323
"""
2424

25-
try:
26-
from docutils import nodes, utils
27-
from sphinx.util.nodes import split_explicit_title
28-
except ImportError:
29-
# Load lazily so that test-sphinxext does not require docutils dependency
30-
pass
25+
from docutils import nodes, utils
26+
from sphinx.util.nodes import split_explicit_title
3127

3228
__version__ = '0.2.0'
3329
__author__ = 'Steven Loria'

0 commit comments

Comments
 (0)
0