cmds: cleanup unused TODO bits
[git-cola.git] / docs / conf.py
blob693d49ea5361d5fb59135cd856b8c58254850a45
1 # -*- coding: utf-8 -*-
2 import os
3 import sys
5 try:
6 import sphinx_rtd_theme
7 except ImportError:
8 sphinx_rtd_theme = None
10 # Add the cola source directory to sys.path
11 docdir = os.path.abspath(os.path.realpath(__file__))
12 srcdir = os.path.dirname(os.path.dirname(docdir))
13 extrasdir = os.path.join(srcdir, 'extras')
14 sys.path.insert(1, extrasdir)
16 extensions = [
17 'sphinx.ext.autodoc',
18 'sphinx.ext.doctest',
19 'sphinx.ext.todo',
20 'sphinx.ext.coverage',
21 'sphinxtogithub',
22 # https://github.com/git-cola/git-cola/issues/1250
23 # https://github.com/jaraco/jaraco.packaging/issues/7
24 # 'jaraco.packaging.sphinx',
25 # Python 3.11 https://github.com/git-cola/git-cola/issues/1251
26 #'rst.linker',
28 if sphinx_rtd_theme:
29 extensions.append('sphinx_rtd_theme')
31 templates_path = ['_templates']
32 source_suffix = '.rst'
33 source_encoding = 'utf-8'
34 master_doc = 'index'
36 project = 'git-cola'
37 copyright = '2007-2022, David Aguilar and contributors'
38 authors = 'David Aguilar and contributors'
40 versionfile = os.path.join(srcdir, 'cola', '_version.py')
41 scope = {}
42 with open(versionfile) as f:
43 exec(f.read(), scope)
45 # The short X.Y version.
46 version = scope['VERSION']
47 # The full version, including alpha/beta/rc tags.
48 release = version
50 exclude_trees = ['_build']
51 add_function_parentheses = True
52 pygments_style = 'default'
54 if sphinx_rtd_theme:
55 html_theme = 'sphinx_rtd_theme'
56 html_theme_path = ['_themes']
57 html_static_path = ['_static']
58 html_show_sourcelink = True
59 htmlhelp_basename = 'git-cola-doc'
61 man_pages = [
62 ('git-cola', 'git-cola', 'The highly caffeinated Git GUI', authors, '1'),
63 ('git-dag', 'git-dag', 'The sleek and powerful Git history browser', authors, '1'),
66 # Sphinx 4.0 creates sub-directories for each man section.
67 # Disable this feature for consistency across Sphinx versions.
68 man_make_section_directory = False
70 latex_documents = [
72 'index',
73 'git-cola.tex',
74 'git-cola Documentation',
75 'David Aguilar and contributors',
76 'manual',
80 # Example configuration for intersphinx: refer to the Python standard library.
81 intersphinx_mapping = {'https://docs.python.org/3': None}
83 # {package_url} is provided py jaraco.packaging.sphinx when available
84 # for use in the rst.linker configuration. We expand the value manually for now.
85 package_url = 'https://github.com/git-cola/git-cola'
87 link_files = {
88 '../CHANGES.rst': dict(
89 using=dict(GH='https://github.com'),
90 replace=[
91 dict(
92 pattern=r'(Issue #|\B#)(?P<issue>\d+)',
93 url='%s/issues/{issue}' % package_url,
95 dict(
96 pattern=r'\B\+(?P<pull>\d+)',
97 url='%s/pull/{pull}' % package_url,
99 dict(
100 pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
101 with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
103 dict(
104 pattern=r'PEP[- ](?P<pep_number>\d+)',
105 url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',