Skip to content

Commit

Permalink
[docs] added validation of rst-files into python-package folder (#998)
Browse files Browse the repository at this point in the history
* added validation of python-package folder

* fixed duplicate explicit targets names
  • Loading branch information
StrikerRUS committed Oct 18, 2017
1 parent a668045 commit fa45a97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ esac
cd $TRAVIS_BUILD_DIR

if [[ ${TASK} == "check-docs" ]]; then
cd docs
sudo apt-get install linkchecker
pip install rstcheck sphinx sphinx_rtd_theme # html5validator
cd python-package
rstcheck --report warning `find . -type f -name "*.rst"` || exit -1
cd ../docs
rstcheck --report warning --ignore-directives=autoclass,autofunction `find . -type f -name "*.rst"` || exit -1
make html || exit -1
find ./_build/html/ -type f -name '*.html' -exec \
Expand Down
8 changes: 4 additions & 4 deletions python-package/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Preparation

`setuptools <https://pypi.python.org/pypi/setuptools>`_ is needed.

For Mac OS X users, gcc with OpenMP support must be installed first. Refer to `Installation Guide <https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#osx>`_ for installing gcc with OpenMP support.
For Mac OS X users, gcc with OpenMP support must be installed first. Refer to `Installation Guide <https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#osx>`__ for installing gcc with OpenMP support.

Note: 32-bit Python is not supported. Please install 64-bit version.

Expand Down Expand Up @@ -47,7 +47,7 @@ Build GPU Version
For Windows users, `CMake <https://cmake.org/>`_ (version 3.8 or higher) is strongly required in this case.

Note: Boost and OpenCL are needed: details for installation can be found in `Installation Guide <https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version>`_. You need to add ``OpenCL_INCLUDE_DIR`` to the environmental variable **'PATH'** and export ``BOOST_ROOT`` before installation.
Note: Boost and OpenCL are needed: details for installation can be found in `Installation Guide <https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version>`__. You need to add ``OpenCL_INCLUDE_DIR`` to the environmental variable **'PATH'** and export ``BOOST_ROOT`` before installation.

Build with MinGW-w64 on Windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -76,9 +76,9 @@ Note: ``sudo`` (or administrator rights in Windows) may be needed to perform the

Run ``python setup.py install --mingw`` if you want to use MinGW-w64 on Windows instead of Visual Studio. `CMake <https://cmake.org/>`_ and `MinGW-w64 <https://mingw-w64.org/>`_ should be installed first.

Run ``python setup.py install --gpu`` to enable GPU support. For Windows users, `CMake <https://cmake.org/>`_ (version 3.8 or higher) is strongly required in this case. Boost and OpenCL are needed: details for installation can be found in `Installation Guide <https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version>`_.
Run ``python setup.py install --gpu`` to enable GPU support. For Windows users, `CMake <https://cmake.org/>`_ (version 3.8 or higher) is strongly required in this case. Boost and OpenCL are needed: details for installation can be found in `Installation Guide <https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version>`__.

If you get any errors during installation or due to any other reason, you may want to build dynamic library from sources by any method you prefer (see `Installation Guide <https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst>`_) and then run ``python setup.py install --precompile``.
If you get any errors during installation or due to any other reason, you may want to build dynamic library from sources by any method you prefer (see `Installation Guide <https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst>`__) and then run ``python setup.py install --precompile``.

Examples
--------
Expand Down

0 comments on commit fa45a97

Please sign in to comment.