Ignore boilerplate constants in autodoc

Since the 2.1.0 Sphinx release[1] module constants are now
autodocumented. Documenting the boilerplate CONF and LOG variables adds
unnecessary clutter to the docs, so add those constants to the ignore
list. This also adds a comment to the Sphinx configuration to explain
the situation.

[1] https://github.com/sphinx-doc/sphinx/issues/6447

Change-Id: If995b17feae6579479c796738ff8c290e550ab3f
This commit is contained in:
Colleen Murphy 2019-06-07 11:35:11 -07:00
parent 485a6b2170
commit 698c20577e
1 changed files with 5 additions and 1 deletions

View File

@ -53,6 +53,9 @@ apidoc_excluded_paths = [
'test']
apidoc_separate_modules = True
# NOTE(cmurphy) exclude these module constants from being autodoc'd, because
# they pull in the documentation from external modules
# https://github.com/sphinx-doc/sphinx/issues/6447
autodoc_default_options = {
'exclude-members': 'Column,Index,String,Integer,Enum,ForeignKey,DateTime,'
'Date,TIMESTAMP,IntegrityError,OperationalError,'
@ -60,7 +63,8 @@ autodoc_default_options = {
'PrimaryKeyConstraint,joinedload,Unicode,'
'RequestValidator,Client,AccessTokenEndpoint,'
'ResourceEndpoint,AuthorizationEndpoint,SIG_HMAC,'
'RequestTokenEndpoint,oRequest'
'RequestTokenEndpoint,oRequest,'
'CONF,LOG'
}
# sphinxcontrib.seqdiag options