conf.py 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # -*- coding: utf-8 -*-
  2. import sys
  3. import os
  4. this = os.path.dirname(os.path.abspath(__file__))
  5. # If your extensions are in another directory, add it here. If the directory
  6. # is relative to the documentation root, use os.path.abspath to make it
  7. # absolute, like shown here.
  8. sys.path.insert(0, os.path.join(this, os.pardir))
  9. sys.path.append(os.path.join(this, '_ext'))
  10. import celery # noqa
  11. # General configuration
  12. # ---------------------
  13. extensions = ['sphinx.ext.autodoc',
  14. 'sphinx.ext.coverage',
  15. 'sphinx.ext.pngmath',
  16. 'sphinx.ext.viewcode',
  17. 'sphinx.ext.coverage',
  18. 'sphinx.ext.intersphinx',
  19. 'celery.contrib.sphinx',
  20. 'githubsphinx',
  21. 'celerydocs']
  22. LINKCODE_URL = 'https://github.com/{proj}/tree/{branch}/{filename}.py'
  23. GITHUB_PROJECT = 'celery/celery'
  24. GITHUB_BRANCH = 'master'
  25. def linkcode_resolve(domain, info):
  26. if domain != 'py' or not info['module']:
  27. return
  28. filename = info['module'].replace('.', '/')
  29. return LINKCODE_URL.format(
  30. proj=GITHUB_PROJECT,
  31. branch=GITHUB_BRANCH,
  32. filename=filename,
  33. )
  34. html_show_sphinx = False
  35. # Add any paths that contain templates here, relative to this directory.
  36. templates_path = ['.templates']
  37. # The suffix of source filenames.
  38. source_suffix = '.rst'
  39. # The master toctree document.
  40. master_doc = 'index'
  41. # General information about the project.
  42. project = 'Celery'
  43. copyright = '2009-2016, Ask Solem & Contributors'
  44. # The version info for the project you're documenting, acts as replacement for
  45. # |version| and |release|, also used in various other places throughout the
  46. # built documents.
  47. #
  48. # The short X.Y version.
  49. version = '.'.join(map(str, celery.VERSION[0:2]))
  50. # The full version, including alpha/beta/rc tags.
  51. release = celery.__version__
  52. exclude_trees = ['.build']
  53. # If true, '()' will be appended to :func: etc. cross-reference text.
  54. add_function_parentheses = True
  55. intersphinx_mapping = {
  56. 'python': ('http://docs.python.org/dev/', None),
  57. 'sphinx': ('http://www.sphinx-doc.org/en/stable/', None),
  58. 'kombu': ('http://kombu.readthedocs.org/en/master/', None),
  59. 'djcelery': ('http://django-celery.readthedocs.org/en/latest/', None),
  60. 'cyme': ('http://cyme.readthedocs.org/en/latest/', None),
  61. 'amqp': ('http://amqp.readthedocs.org/en/latest/', None),
  62. 'vine': ('http://vine.readthedocs.org/en/latest/', None),
  63. 'flower': ('http://flower.readthedocs.org/en/latest/', None),
  64. 'redis': ('http://redis-py.readthedocs.org/en/latest/', None),
  65. 'django': ('http://django.readthedocs.org/en/latest/', None),
  66. 'boto': ('http://boto.readthedocs.org/en/latest/', None),
  67. 'sqlalchemy': ('http://sqlalchemy.readthedocs.org/en/latest', None),
  68. 'kazoo': ('http://kazoo.readthedocs.org/en/latest/', None),
  69. 'pyzmq': ('http://pyzmq.readthedocs.org/en/latest/', None),
  70. 'msgpack': ('http://pythonhosted.org/msgpack-python/', None),
  71. 'riak': ('http://basho.github.io/riak-python-client/', None),
  72. 'pylibmc': ('http://sendapatch.se/projects/pylibmc/', None),
  73. 'eventlet': ('http://eventlet.net/doc/', None),
  74. 'gevent': ('http://gevent.org/', None),
  75. 'pyOpenSSL': ('http://pyopenssl.readthedocs.org/en/stable/', None),
  76. }
  77. # The name of the Pygments (syntax highlighting) style to use.
  78. pygments_style = 'colorful'
  79. # Add any paths that contain custom static files (such as style sheets) here,
  80. # relative to this directory. They are copied after the builtin static files,
  81. # so a file named "default.css" will overwrite the builtin "default.css".
  82. html_static_path = ['.static']
  83. html_use_smartypants = True
  84. add_module_names = True
  85. highlight_language = 'python3'
  86. # If false, no module index is generated.
  87. html_use_modindex = True
  88. # If false, no index is generated.
  89. html_use_index = True
  90. latex_documents = [
  91. ('index', 'Celery.tex', 'Celery Documentation',
  92. 'Ask Solem & Contributors', 'manual'),
  93. ]
  94. html_theme = 'celery'
  95. html_theme_path = ['_theme']
  96. html_sidebars = {
  97. 'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],
  98. '**': ['sidebarlogo.html', 'relations.html',
  99. 'sourcelink.html', 'searchbox.html'],
  100. }
  101. # ## Issuetracker
  102. github_project = 'celery/celery'
  103. # -- Options for Epub output -------------------------------------------
  104. # Bibliographic Dublin Core info.
  105. epub_title = 'Celery Manual, Version {0}'.format(version)
  106. epub_author = 'Ask Solem'
  107. epub_publisher = 'Celery Project'
  108. epub_copyright = '2009-2014'
  109. # The language of the text. It defaults to the language option
  110. # or en if the language is not set.
  111. epub_language = 'en'
  112. # The scheme of the identifier. Typical schemes are ISBN or URL.
  113. epub_scheme = 'ISBN'
  114. # The unique identifier of the text. This can be a ISBN number
  115. # or the project homepage.
  116. epub_identifier = 'celeryproject.org'
  117. # A unique identification for the text.
  118. epub_uid = 'Celery Manual, Version {0}'.format(version)
  119. # ## HTML files that should be inserted before the pages created by sphinx.
  120. # ## The format is a list of tuples containing the path and title.
  121. # epub_pre_files = []
  122. # ## HTML files shat should be inserted after the pages created by sphinx.
  123. # ## The format is a list of tuples containing the path and title.
  124. # epub_post_files = []
  125. # A list of files that should not be packed into the epub file.
  126. epub_exclude_files = ['search.html']
  127. # The depth of the table of contents in toc.ncx.
  128. epub_tocdepth = 3