Skip to content

Commit

Permalink
[docs] run pycodestyle for docs folder (#1687)
Browse files Browse the repository at this point in the history
* run pytest for docs folder too

* fixed pylint error and some minor style issues
  • Loading branch information
StrikerRUS committed Sep 21, 2018
1 parent 44ed427 commit eb131ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .ci/test.sh
Expand Up @@ -46,7 +46,7 @@ fi

if [[ $TASK == "pylint" ]]; then
conda install -y -n $CONDA_ENV pycodestyle
pycodestyle --ignore=E501,W503 --exclude=./compute,./docs,./.nuget . || exit -1
pycodestyle --ignore=E501,W503 --exclude=./compute,./.nuget . || exit -1
exit 0
fi

Expand Down
13 changes: 4 additions & 9 deletions docs/conf.py
Expand Up @@ -15,8 +15,8 @@

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# documentation root, use os.path.abspath to make it absolute.

import datetime
import os
import sys
Expand All @@ -34,12 +34,10 @@
from mock import Mock # Python 2.x

MOCK_MODULES = ['numpy', 'scipy', 'scipy.sparse',
'sklearn', 'matplotlib', 'pandas', 'graphviz',
]
'sklearn', 'matplotlib', 'pandas', 'graphviz']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()


# -- General configuration ------------------------------------------------

os.environ['LIGHTGBM_BUILD_DOC'] = '1'
Expand Down Expand Up @@ -72,7 +70,7 @@

# General information about the project.
project = 'LightGBM'
copyright = '%s, Microsoft Corporation' % (str(datetime.datetime.now().year))
copyright = '%s, Microsoft Corporation' % str(datetime.datetime.now().year)
author = 'Microsoft Corporation'

# The version info for the project you're documenting, acts as replacement for
Expand Down Expand Up @@ -109,13 +107,11 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
'includehidden': False,
}
Expand All @@ -125,7 +121,6 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
Expand Down

0 comments on commit eb131ea

Please sign in to comment.