Skip to content

Commit

Permalink
Merge pull request tornadoweb#2562 from bdarnell/docs-update
Browse files Browse the repository at this point in the history
docs: Minor updates
  • Loading branch information
bdarnell authored Dec 30, 2018
2 parents 15eebc4 + e5bd1c2 commit 9ff87e3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 19 deletions.
8 changes: 8 additions & 0 deletions docs/conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# TODO: remove when RTD supports python 3.7 without conda
name: tornado-docs
dependencies:
- python=3.7
- pip:
- sphinx
- sphinx-rtd-theme
- Twisted
32 changes: 17 additions & 15 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Ensure we get the local copy of tornado instead of what's on the standard path
import os
import sys
import time

sys.path.insert(0, os.path.abspath(".."))
import tornado

master_doc = "index"

project = "Tornado"
copyright = "2009-%s, The Tornado Authors" % time.strftime("%Y")
copyright = "The Tornado Authors"

version = release = tornado.version

Expand All @@ -20,8 +20,8 @@
"sphinx.ext.viewcode",
]

primary_domain = 'py'
default_role = 'py:obj'
primary_domain = "py"
default_role = "py:obj"

autodoc_member_order = "bysource"
autoclass_content = "both"
Expand All @@ -42,14 +42,12 @@
coverage_ignore_classes = [
# tornado.gen
"Runner",

# tornado.web
"ChunkedTransferEncoding",
"GZipContentEncoding",
"OutputTransform",
"TemplateModule",
"url",

# tornado.websocket
"WebSocketProtocol",
"WebSocketProtocol13",
Expand All @@ -60,32 +58,36 @@
# various modules
"doctests",
"main",

# tornado.escape
# parse_qs_bytes should probably be documented but it's complicated by
# having different implementations between py2 and py3.
"parse_qs_bytes",

# tornado.gen
"Multi",
]

html_favicon = 'favicon.ico'
html_favicon = "favicon.ico"

latex_documents = [
('index', 'tornado.tex', 'Tornado Documentation', 'The Tornado Authors', 'manual', False),
(
"index",
"tornado.tex",
"Tornado Documentation",
"The Tornado Authors",
"manual",
False,
)
]

intersphinx_mapping = {
'python': ('https://docs.python.org/3.6/', None),
}
intersphinx_mapping = {"python": ("https://docs.python.org/3.6/", None)}

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
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 = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
3 changes: 1 addition & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# https://bugs.python.org/issue34700
sphinx<1.8.0
sphinx>1.8.2
sphinx_rtd_theme
Twisted
2 changes: 1 addition & 1 deletion maint/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pycares
pycurl

# Other useful tools
Sphinx<1.8.0
Sphinx>1.8.2
autopep8
black
coverage
Expand Down
2 changes: 1 addition & 1 deletion maint/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ requests==2.20.0
requests-toolbelt==0.8.0
six==1.11.0
snowballstemmer==1.2.1
Sphinx==1.7.9
Sphinx==1.8.3
sphinx-rtd-theme==0.4.2
sphinxcontrib-websupport==1.1.0
toml==0.10.0
Expand Down
4 changes: 4 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# TODO: remove when RTD supports Python 3.7 without conda.
# https://github.com/rtfd/readthedocs-docker-images/pull/73
conda:
file: docs/conda.yml

0 comments on commit 9ff87e3

Please sign in to comment.