Skip to content

DOC/CI: include api docs on travis #12002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ matrix:
- NOSE_ARGS="not slow and not disabled"
- FULL_DEPS=true
- CLIPBOARD_GUI=gtk2
- DOC_BUILD=true # if rst files were changed, build docs in parallel with tests
- python: 3.4
env:
- JOB_NAME: "34_nslow"
Expand Down Expand Up @@ -88,6 +87,13 @@ matrix:
- JOB_TAG=_NUMPY_DEV
- NOSE_ARGS="not slow and not network and not disabled"
- PANDAS_TESTING_MODE="deprecate"
- python: 2.7
env:
- JOB_NAME: "doc_build"
- FULL_DEPS=true
- BUILD_TYPE=conda
- DOC_BUILD=true # if rst files were changed, build docs in parallel with tests
- JOB_TAG=_DOC_BUILD
allow_failures:
- python: 2.7
env:
Expand Down Expand Up @@ -121,6 +127,13 @@ matrix:
- JOB_TAG=_NUMPY_DEV
- NOSE_ARGS="not slow and not network and not disabled"
- PANDAS_TESTING_MODE="deprecate"
- python: 2.7
env:
- JOB_NAME: "doc_build"
- FULL_DEPS=true
- BUILD_TYPE=conda
- DOC_BUILD=true
- JOB_TAG=_DOC_BUILD

before_install:
- echo "before_install"
Expand Down Expand Up @@ -149,13 +162,12 @@ before_script:

script:
- echo "script"
- ci/run_build_docs.sh &
- ci/run_build_docs.sh
- ci/script.sh
# nothing here, or failed tests won't fail travis

after_script:
- ci/install_test.sh
- if [ -f /tmp/doc.log ]; then cat /tmp/doc.log; fi
- source activate pandas && ci/print_versions.py
- ci/print_skipped.py /tmp/nosetests.xml
- ci/lint.sh
Expand Down
12 changes: 6 additions & 6 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ fi

if [ x"$DOC_BUILD" != x"" ]; then

# we're running network tests, let's build the docs in the meantime
echo "Will build docs"
conda install -n pandas sphinx=1.1.3 pygments ipython=2.4 --yes

source activate pandas
conda install -n pandas -c r r rpy2 --yes
pip install sphinx -U

time sudo apt-get $APT_ARGS install dvipng

mv "$TRAVIS_BUILD_DIR"/doc /tmp
cd /tmp/doc

rm /tmp/doc/source/api.rst # no R
rm /tmp/doc/source/r_interface.rst # no R

echo ###############################
echo # Log file for the doc build #
echo ###############################

echo -e "y\n" | ./make.py --no-api 2>&1
echo ./make.py
./make.py

cd /tmp/doc/build/html
git config --global user.email "[email protected]"
Expand Down
4 changes: 4 additions & 0 deletions ci/requirements-2.7_DOC_BUILD.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dateutil
pytz
numpy
cython
16 changes: 16 additions & 0 deletions ci/requirements-2.7_DOC_BUILD.run
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ipython=3.2.1
nbconvert
matplotlib
scipy
lxml
beautiful-soup
html5lib
pytables
openpyxl=1.8.5
xlrd
xlwt
xlsxwriter
sqlalchemy
numexpr
bottleneck
statsmodels
2 changes: 1 addition & 1 deletion ci/run_build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "inside $0"

"$TRAVIS_BUILD_DIR"/ci/build_docs.sh 2>&1 > /tmp/doc.log &
"$TRAVIS_BUILD_DIR"/ci/build_docs.sh 2>&1

# wait until subprocesses finish (build_docs.sh)
wait
Expand Down
5 changes: 5 additions & 0 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ echo "inside $0"

source activate pandas

# don't run the tests for the doc build
if [ x"$DOC_BUILD" != x"" ]; then
exit 0
fi

if [ -n "$LOCALE_OVERRIDE" ]; then
export LC_ALL="$LOCALE_OVERRIDE";
echo "Setting LC_ALL to $LOCALE_OVERRIDE"
Expand Down
15 changes: 8 additions & 7 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4918,12 +4918,13 @@ def quantile(self, q=0.5, axis=0, numeric_only=True,
.. versionadded:: 0.18.0
This optional parameter specifies the interpolation method to use,
when the desired quantile lies between two data points `i` and `j`:
* linear: `i + (j - i) * fraction`, where `fraction` is the
fractional part of the index surrounded by `i` and `j`.
* lower: `i`.
* higher: `j`.
* nearest: `i` or `j` whichever is nearest.
* midpoint: (`i` + `j`) / 2.

* linear: `i + (j - i) * fraction`, where `fraction` is the
fractional part of the index surrounded by `i` and `j`.
* lower: `i`.
* higher: `j`.
* nearest: `i` or `j` whichever is nearest.
* midpoint: (`i` + `j`) / 2.

Returns
-------
Expand All @@ -4938,7 +4939,7 @@ def quantile(self, q=0.5, axis=0, numeric_only=True,
--------

>>> df = DataFrame(np.array([[1, 1], [2, 10], [3, 100], [4, 100]]),
columns=['a', 'b'])
columns=['a', 'b'])
>>> df.quantile(.1)
a 1.3
b 3.7
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def count(self):
----------
func : function
Must produce a single value from an ndarray input
*args and **kwargs are passed to the function""")
\*args and \*\*kwargs are passed to the function""")

def apply(self, func, args=(), kwargs={}):
# TODO: _level is unused?
Expand Down
10 changes: 5 additions & 5 deletions pandas/util/nosetester.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def test(self, label='fast', verbose=1, extra_argv=None,
* 'full' - fast (as above) and slow tests as in the
'no -A' option to nosetests - this is the same as ''.
* None or '' - run all tests.
attribute_identifier - string passed directly to nosetests as '-A'.
* attribute_identifier - string passed directly to nosetests as '-A'.
verbose : int, optional
Verbosity value for test outputs, in the range 1-10. Default is 1.
extra_argv : list, optional
Expand All @@ -147,14 +147,14 @@ def test(self, label='fast', verbose=1, extra_argv=None,
If True, run doctests in module. Default is False.
coverage : bool, optional
If True, report coverage of NumPy code. Default is False.
(This requires the `coverage module:
<http://nedbatchelder.com/code/modules/coverage.html>`_).
(This requires the `coverage module
<http://nedbatchelder.com/code/modules/coverage.html>`_).
raise_warnings : str or sequence of warnings, optional
This specifies which warnings to configure as 'raise' instead
of 'warn' during the test execution. Valid strings are:

- "develop" : equals ``(DeprecationWarning, RuntimeWarning)``
- "release" : equals ``()``, don't raise on any warnings.
- "develop" : equals ``(DeprecationWarning, RuntimeWarning)``
- "release" : equals ``()``, don't raise on any warnings.

Returns
-------
Expand Down