LightGBM/docs
James Lamb 02d212b4c0
[ci] [python-package] enforce flake8 checks (fixes #5566) (#5659)
2023-01-12 15:59:52 -06:00
..
_static [ci] Update version of Azure REST API (#5172) 2022-04-24 10:44:40 -05:00
logo [R-package] Add R logo (fixes #3331, #3332) (#3336) 2020-08-29 23:09:26 -05:00
.linkcheckerrc [ci] move link checking to a cron job (#3890) 2021-02-02 23:31:00 +03:00
Advanced-Topics.rst [docs] update categorical feature description in Advanced Topics (#5044) 2022-03-05 04:36:11 +03:00
C-API.rst [ci][docs] generate docs for C API (#2059) 2019-05-05 14:54:37 +03:00
Development-Guide.rst Decouple Boosting Types (fixes #3128) (#4827) 2022-12-28 14:09:11 +08:00
Experiments.rst [ci] make check-docs job compatible with rstcheck 6.x (#5388) 2022-07-27 23:23:44 -05:00
FAQ.rst [R-package] remove lgb.unloader() (#5204) 2022-05-10 17:20:37 -05:00
Features.rst [docs] fix a typo Features.rst (#5463) 2022-09-02 22:20:46 -05:00
GPU-Performance.rst [docs] Add alt text on images (related to #4036) (#4038) 2021-03-25 03:13:28 +03:00
GPU-Targets.rst [docs] Use https links in docs (#5284) 2022-06-13 21:57:13 +03:00
GPU-Tutorial.rst [docs] improve wordings and code style (#3887) 2021-02-01 02:28:01 +03:00
GPU-Windows.rst [docs] Fix links (#5451) 2022-08-30 16:32:38 +03:00
Installation-Guide.rst [ci] switch to manylinux_2_28 for Linux artifacts (fixes #5514, fixes #5589) (#5580) 2022-11-20 23:13:38 -06:00
Key-Events.md [docs] updated Microsoft GitHub URL (#2152) 2019-05-08 13:51:28 +08:00
Makefile [docs] fixed building at Python 2.x (#997) 2017-10-30 11:44:08 +08:00
Parallel-Learning-Guide.rst [docs] Fix links (#5451) 2022-08-30 16:32:38 +03:00
Parameters-Tuning.rst [python] remove `early_stopping_rounds` argument of `train()` and `cv()` functions (#4908) 2021-12-26 17:20:49 +03:00
Parameters.rst Decouple Boosting Types (fixes #3128) (#4827) 2022-12-28 14:09:11 +08:00
Python-API.rst [python] rename `print_evaluation()` into `log_evaluation()` (#4604) 2021-09-16 01:26:02 +03:00
Python-Intro.rst [python] remove `early_stopping_rounds` argument of `train()` and `cv()` functions (#4908) 2021-12-26 17:20:49 +03:00
Quick-Start.rst [docs] Change some 'parallel learning' references to 'distributed learning' (#4000) 2021-02-19 09:47:30 -06:00
README.rst [docs] improve docs for sklearn wrapper (fixes #4479) (#5026) 2022-02-22 21:49:39 -06:00
build-docs.sh [ci][docs] use miniforge for readthedocs builds (fixes #4954) (#4957) 2022-02-19 06:29:56 +03:00
conf.py [ci] [python-package] enforce flake8 checks (fixes #5566) (#5659) 2023-01-12 15:59:52 -06:00
env.yml [docs] [R-package] upgrade to roxygen2 7.2.1 (#5381) 2022-07-28 09:13:12 -05:00
gcc-Tips.rst [docs] fix markdown in docs (#4191) 2021-04-18 02:11:12 +03:00
index.rst Update index.rst (#4029) 2021-03-10 09:32:46 -06:00
make.bat [ci][docs] fix broken links (#3176) 2020-06-22 11:36:15 -05:00

README.rst

Documentation
=============

Documentation for LightGBM is generated using `Sphinx <https://www.sphinx-doc.org/>`__
and `Breathe <https://breathe.readthedocs.io/>`__, which works on top of `Doxygen <https://www.doxygen.nl/index.html>`__ output.

List of parameters and their descriptions in `Parameters.rst <./Parameters.rst>`__
is generated automatically from comments in `config file <https://github.com/microsoft/LightGBM/blob/master/include/LightGBM/config.h>`__
by `this script <https://github.com/microsoft/LightGBM/blob/master/helpers/parameter_generator.py>`__.

After each commit on ``master``, documentation is updated and published to `Read the Docs <https://lightgbm.readthedocs.io/>`__.

Build
-----

It is not necessary to re-build this documentation while modifying LightGBM's source code.
The HTML files generated using ``Sphinx`` are not checked into source control.
However, you may want to build them locally during development to test changes.

Docker
^^^^^^

The most reliable way to build the documentation locally is with Docker, using `the same images Read the Docs uses <https://hub.docker.com/r/readthedocs/build>`_.

Run the following from the root of this repository to pull the relevant image and run a container locally.

.. code:: sh

    docker run \
        --rm \
        --user=0 \
        -v $(pwd):/opt/LightGBM \
        --env C_API=true \
        --env CONDA=/opt/miniforge \
        --env READTHEDOCS=true \
        --workdir=/opt/LightGBM/docs \
        --entrypoint="" \
        -it readthedocs/build:ubuntu-20.04-2021.09.23 \
        /bin/bash build-docs.sh

When that code completes, open ``docs/_build/html/index.html`` in your browser.

.. note::

    The navigation in these locally-built docs does not link to the local copy of the R documentation. To view the local version of the R docs, open ``docs/_build/html/R/index.html`` in your browser.

Without Docker
^^^^^^^^^^^^^^

You can build the documentation locally without Docker. Just install Doxygen and run in ``docs`` folder

.. code:: sh

    pip install breathe sphinx 'sphinx_rtd_theme>=0.5'
    make html

Note that this will not build the R documentation.
Consider using common R utilities for documentation generation, if you need it.
Or use the Docker-based approach described above to build the R documentation locally.

Optionally, you may also install ``scikit-learn`` and get richer documentation for the classes in ``Scikit-learn API``.

If you faced any problems with Doxygen installation or you simply do not need documentation for C code, it is possible to build the documentation without it:

.. code:: sh

    pip install sphinx 'sphinx_rtd_theme>=0.5'
    export C_API=NO || set C_API=NO
    make html