We use Sphinx to generate our HTML documentation. You will need the following packages installed in order to build Bokeh documentation:
These can be installed using
pip or from source. In
addition to the package requirements, you will also need to have the sample
data downloaded. See Sample Data instructions on how to
To generate the full HTML documentation, navigate to the
subdirectory of the Bokeh source checkout, and execute the corresponding
To start a server and automatically open the built documentation in a browser, execute the command:
Docstrings should generally begin with a verb stating what the function or method does in a short statement. For example:
""" Create and return a new Foo."""
is to be preferred over:
""" This function creates and returns a new Foo. """
All docstrings for functions and methods should have an Args: section
(if any arguments are accepted) and also a Returns: section (even if
the function just returns
Short descriptions for parameters should be written in such a way that inserting an implicit “IS” makes a complete sentence. For example:
title_font (str, optional) : a font used for the plot title (default: Sans)
can be reasonably read as “title_font IS a font used for the plot title”.