diff --git a/.travis.yml b/.travis.yml index 049a5c056928c..7dbc2fb821162 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" @@ -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: @@ -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" @@ -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 diff --git a/ci/build_docs.sh b/ci/build_docs.sh index a8488e202dbec..a906b78de5389 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -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 "pandas-docs-bot@localhost.foo" diff --git a/ci/requirements-2.7_DOC_BUILD.build b/ci/requirements-2.7_DOC_BUILD.build new file mode 100644 index 0000000000000..faf1e3559f7f1 --- /dev/null +++ b/ci/requirements-2.7_DOC_BUILD.build @@ -0,0 +1,4 @@ +dateutil +pytz +numpy +cython diff --git a/ci/requirements-2.7_DOC_BUILD.run b/ci/requirements-2.7_DOC_BUILD.run new file mode 100644 index 0000000000000..8e96f87d4fcd2 --- /dev/null +++ b/ci/requirements-2.7_DOC_BUILD.run @@ -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 diff --git a/ci/run_build_docs.sh b/ci/run_build_docs.sh index c04c815297aa3..2909b9619552e 100755 --- a/ci/run_build_docs.sh +++ b/ci/run_build_docs.sh @@ -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 diff --git a/ci/script.sh b/ci/script.sh index 1126e8249646c..b2e02d27c970b 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -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" diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 573e1a4124b6e..907da619b1875 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -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 ------- @@ -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 diff --git a/pandas/core/window.py b/pandas/core/window.py index 04103893a5e55..40906cf8e5363 100644 --- a/pandas/core/window.py +++ b/pandas/core/window.py @@ -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? diff --git a/pandas/util/nosetester.py b/pandas/util/nosetester.py index eee5dfee809be..fc42d8ba7b54a 100644 --- a/pandas/util/nosetester.py +++ b/pandas/util/nosetester.py @@ -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 @@ -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: - `_). + (This requires the `coverage module + `_). 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 -------