2011-06-09 06:58:58 +00:00
|
|
|
# Ensure we get the local copy of tornado instead of what's on the standard path
|
|
|
|
import os
|
|
|
|
import sys
|
2015-07-20 12:36:04 +00:00
|
|
|
import time
|
2013-03-10 20:24:38 +00:00
|
|
|
sys.path.insert(0, os.path.abspath(".."))
|
2011-06-09 06:58:58 +00:00
|
|
|
import tornado
|
|
|
|
|
|
|
|
master_doc = "index"
|
|
|
|
|
|
|
|
project = "Tornado"
|
2015-07-20 12:36:04 +00:00
|
|
|
copyright = "2009-%s, The Tornado Authors" % time.strftime("%Y")
|
2011-06-09 06:58:58 +00:00
|
|
|
|
|
|
|
version = release = tornado.version
|
|
|
|
|
2013-03-10 19:04:06 +00:00
|
|
|
extensions = [
|
|
|
|
"sphinx.ext.autodoc",
|
|
|
|
"sphinx.ext.coverage",
|
2015-02-08 21:09:00 +00:00
|
|
|
"sphinx.ext.doctest",
|
2013-03-10 19:04:06 +00:00
|
|
|
"sphinx.ext.extlinks",
|
2013-03-16 02:56:03 +00:00
|
|
|
"sphinx.ext.intersphinx",
|
2013-03-10 19:04:06 +00:00
|
|
|
"sphinx.ext.viewcode",
|
|
|
|
]
|
2011-06-17 05:36:33 +00:00
|
|
|
|
|
|
|
primary_domain = 'py'
|
|
|
|
default_role = 'py:obj'
|
2011-06-09 06:58:58 +00:00
|
|
|
|
|
|
|
autodoc_member_order = "bysource"
|
2011-06-11 21:53:28 +00:00
|
|
|
autoclass_content = "both"
|
2011-06-09 18:03:49 +00:00
|
|
|
|
2013-12-31 22:50:12 +00:00
|
|
|
# Without this line sphinx includes a copy of object.__init__'s docstring
|
|
|
|
# on any class that doesn't define __init__.
|
|
|
|
# https://bitbucket.org/birkenfeld/sphinx/issue/1337/autoclass_content-both-uses-object__init__
|
|
|
|
autodoc_docstring_signature = False
|
|
|
|
|
2011-06-09 18:03:49 +00:00
|
|
|
coverage_skip_undoc_in_source = True
|
2011-09-05 01:00:06 +00:00
|
|
|
coverage_ignore_modules = [
|
2013-12-31 22:50:12 +00:00
|
|
|
"tornado.platform.asyncio",
|
2014-05-25 14:54:26 +00:00
|
|
|
"tornado.platform.caresresolver",
|
2011-09-05 01:00:06 +00:00
|
|
|
"tornado.platform.twisted",
|
|
|
|
]
|
2011-06-09 18:03:49 +00:00
|
|
|
# I wish this could go in a per-module file...
|
|
|
|
coverage_ignore_classes = [
|
2014-04-27 03:56:16 +00:00
|
|
|
# tornado.concurrent
|
|
|
|
"TracebackFuture",
|
|
|
|
|
2011-09-04 22:39:55 +00:00
|
|
|
# tornado.gen
|
|
|
|
"Runner",
|
|
|
|
|
2012-11-27 02:46:16 +00:00
|
|
|
# tornado.ioloop
|
|
|
|
"PollIOLoop",
|
|
|
|
|
2011-06-09 18:03:49 +00:00
|
|
|
# tornado.web
|
|
|
|
"ChunkedTransferEncoding",
|
|
|
|
"GZipContentEncoding",
|
|
|
|
"OutputTransform",
|
|
|
|
"TemplateModule",
|
|
|
|
"url",
|
2012-01-08 08:01:18 +00:00
|
|
|
|
|
|
|
# tornado.websocket
|
|
|
|
"WebSocketProtocol",
|
|
|
|
"WebSocketProtocol13",
|
|
|
|
"WebSocketProtocol76",
|
2011-06-09 18:03:49 +00:00
|
|
|
]
|
2011-06-19 18:23:53 +00:00
|
|
|
|
|
|
|
coverage_ignore_functions = [
|
|
|
|
# various modules
|
|
|
|
"doctests",
|
|
|
|
"main",
|
2014-05-25 14:54:26 +00:00
|
|
|
|
|
|
|
# tornado.escape
|
|
|
|
# parse_qs_bytes should probably be documented but it's complicated by
|
|
|
|
# having different implementations between py2 and py3.
|
|
|
|
"parse_qs_bytes",
|
2011-06-19 18:23:53 +00:00
|
|
|
]
|
2012-08-11 16:07:33 +00:00
|
|
|
|
2013-03-10 19:58:05 +00:00
|
|
|
html_favicon = 'favicon.ico'
|
2012-08-11 16:07:33 +00:00
|
|
|
|
|
|
|
latex_documents = [
|
2015-08-26 18:13:23 +00:00
|
|
|
('index', 'tornado.tex', 'Tornado Documentation', 'The Tornado Authors', 'manual', False),
|
2012-08-11 16:07:33 +00:00
|
|
|
]
|
2013-03-10 19:04:06 +00:00
|
|
|
|
|
|
|
# HACK: sphinx has limited support for substitutions with the |version|
|
|
|
|
# variable, but there doesn't appear to be any way to use this in a link
|
|
|
|
# target.
|
|
|
|
# http://stackoverflow.com/questions/1227037/substitutions-inside-links-in-rest-sphinx
|
|
|
|
# The extlink extension can be used to do link substitutions, but it requires a
|
|
|
|
# portion of the url to be literally contained in the document. Therefore,
|
|
|
|
# this link must be referenced as :current_tarball:`z`
|
|
|
|
extlinks = {
|
|
|
|
'current_tarball': (
|
2013-03-29 12:55:39 +00:00
|
|
|
'https://pypi.python.org/packages/source/t/tornado/tornado-%s.tar.g%%s' % version,
|
2013-03-10 19:04:06 +00:00
|
|
|
'tornado-%s.tar.g' % version),
|
|
|
|
}
|
2013-03-16 02:56:03 +00:00
|
|
|
|
|
|
|
intersphinx_mapping = {
|
2015-03-04 03:51:17 +00:00
|
|
|
'python': ('https://docs.python.org/3.4/', None),
|
2013-03-16 02:56:03 +00:00
|
|
|
}
|
2014-07-13 02:57:16 +00:00
|
|
|
|
|
|
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
|
|
|
|
|
|
|
# On RTD we can't import sphinx_rtd_theme, but it will be applied by
|
|
|
|
# default anyway. This block will use the same theme when building locally
|
|
|
|
# as on RTD.
|
|
|
|
if not on_rtd:
|
|
|
|
import sphinx_rtd_theme
|
|
|
|
html_theme = 'sphinx_rtd_theme'
|
|
|
|
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|