|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 | # |
3 | | -# Project Trellis documentation build configuration file, created by |
4 | | -# sphinx-quickstart on Mon Feb 5 11:04:37 2018. |
5 | | -# |
6 | | -# This file is execfile()d with the current directory set to its |
7 | | -# containing dir. |
8 | | -# |
9 | | -# Note that not all possible configuration values are present in this |
10 | | -# autogenerated file. |
11 | | -# |
12 | | -# All configuration values have a default; values that are commented out |
13 | | -# serve to show the default. |
| 3 | +# Updated documentation of the configuration options is available at |
| 4 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
14 | 5 |
|
15 | | -import re |
| 6 | +from re import sub as re_sub |
| 7 | +from os import environ, popen, path as os_path |
| 8 | +from sys import path as sys_path |
16 | 9 |
|
17 | | -# Markdown support |
18 | | -import recommonmark |
| 10 | +sys_path.insert(0, os_path.abspath('.')) |
19 | 11 |
|
20 | | -# If extensions (or modules to document with autodoc) are in another directory, |
21 | | -# add these directories to sys.path here. If the directory is relative to the |
22 | | -# documentation root, use os.path.abspath to make it absolute, like shown here. |
23 | | -# |
24 | | -import os |
25 | | -import sys |
26 | | -sys.path.insert(0, os.path.abspath('.')) |
27 | 12 | from markdown_code_symlinks import MarkdownCodeSymlinks |
28 | 13 |
|
29 | 14 | # -- General configuration ------------------------------------------------ |
30 | 15 |
|
31 | | -# If your documentation needs a minimal Sphinx version, state it here. |
32 | | -# |
33 | | -# needs_sphinx = '1.0' |
| 16 | +project = 'Project Trellis' |
| 17 | +author = 'Project Trellis Authors' |
| 18 | +copyright = f'2018, {author}' |
34 | 19 |
|
35 | | -# Add any Sphinx extension module names here, as strings. They can be |
36 | | -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
37 | | -# ones. |
38 | 20 | extensions = [ |
39 | 21 | 'sphinx.ext.imgmath', 'sphinx.ext.autodoc', 'sphinx.ext.doctest', |
40 | | - 'sphinx.ext.autosummary', 'sphinx.ext.napoleon', 'sphinx.ext.todo' |
| 22 | + 'sphinx.ext.autosummary', 'sphinx.ext.napoleon', 'sphinx.ext.todo', |
| 23 | + 'recommonmark' |
41 | 24 | ] |
42 | 25 |
|
43 | | -# Add any paths that contain templates here, relative to this directory. |
44 | 26 | templates_path = ['_templates'] |
45 | 27 |
|
46 | | -# The suffix(es) of source filenames. |
47 | | -# You can specify multiple suffix as a list of string: |
48 | 28 | source_suffix = ['.rst', '.md'] |
49 | 29 | source_parsers = { |
50 | 30 | '.md': 'recommonmark.parser.CommonMarkParser', |
51 | 31 | } |
52 | 32 |
|
53 | | -# The master toctree document. |
54 | 33 | master_doc = 'index' |
55 | 34 |
|
56 | | -# General information about the project. |
57 | | -project = u'Project Trellis' |
58 | | -copyright = u'2018, SymbiFlow Team' |
59 | | -author = u'SymbiFlow Team' |
60 | | - |
61 | | -# The version info for the project you're documenting, acts as replacement for |
62 | | -# |version| and |release|, also used in various other places throughout the |
63 | | -# built documents. |
64 | | -# |
65 | | -# The full version, including alpha/beta/rc tags. |
66 | | -release = re.sub('^v', '', os.popen('git describe ').read().strip()) |
67 | | -# The short X.Y version. |
| 35 | +release = re_sub('^v', '', popen('git describe ').read().strip()) |
68 | 36 | version = release |
69 | 37 |
|
70 | | -# The language for content autogenerated by Sphinx. Refer to documentation |
71 | | -# for a list of supported languages. |
72 | | -# |
73 | | -# This is also used if you do content translation via gettext catalogs. |
74 | | -# Usually you set "language" from the command line for these cases. |
75 | 38 | language = None |
76 | 39 |
|
77 | | -# List of patterns, relative to source directory, that match files and |
78 | | -# directories to ignore when looking for source files. |
79 | | -# This patterns also effect to html_static_path and html_extra_path |
80 | 40 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
81 | 41 |
|
82 | | -# The name of the Pygments (syntax highlighting) style to use. |
83 | 42 | pygments_style = 'sphinx' |
84 | 43 |
|
85 | | -# If true, `todo` and `todoList` produce output, else they produce nothing. |
86 | 44 | todo_include_todos = True |
87 | 45 |
|
88 | 46 | # -- Options for HTML output ---------------------------------------------- |
89 | 47 |
|
90 | | -# The theme to use for HTML and HTML Help pages. See the documentation for |
91 | | -# a list of builtin themes. |
92 | | -# |
93 | 48 | html_theme = 'sphinx_rtd_theme' |
94 | 49 |
|
95 | | -# Theme options are theme-specific and customize the look and feel of a theme |
96 | | -# further. For a list of options available for each theme, see the |
97 | | -# documentation. |
98 | | -# |
99 | | -# html_theme_options = {} |
100 | | - |
101 | | -# Enable github links when not on readthedocs |
102 | | -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
| 50 | +on_rtd = environ.get('READTHEDOCS', None) == 'True' |
103 | 51 | if not on_rtd: |
104 | 52 | html_context = { |
105 | 53 | "display_github": True, # Integrate GitHub |
|
109 | 57 | "conf_py_path": "/doc/", |
110 | 58 | } |
111 | 59 |
|
112 | | -# Add any paths that contain custom static files (such as style sheets) here, |
113 | | -# relative to this directory. They are copied after the builtin static files, |
114 | | -# so a file named "default.css" will overwrite the builtin "default.css". |
115 | 60 | html_static_path = ['_static'] |
116 | 61 |
|
117 | | -# Custom sidebar templates, must be a dictionary that maps document names |
118 | | -# to template names. |
119 | | -# |
120 | | -# This is required for the alabaster theme |
121 | | -# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars |
122 | 62 | html_sidebars = { |
123 | 63 | '**': [ |
124 | 64 | 'relations.html', # needs 'show_related': True theme option to display |
|
128 | 68 |
|
129 | 69 | # -- Options for HTMLHelp output ------------------------------------------ |
130 | 70 |
|
131 | | -# Output file base name for HTML help builder. |
132 | 71 | htmlhelp_basename = 'prjtrellis' |
133 | 72 |
|
134 | 73 | # -- Options for LaTeX output --------------------------------------------- |
135 | 74 |
|
136 | | -latex_elements = { |
137 | | - # The paper size ('letterpaper' or 'a4paper'). |
138 | | - # |
139 | | - # 'papersize': 'letterpaper', |
140 | | - |
141 | | - # The font size ('10pt', '11pt' or '12pt'). |
142 | | - # |
143 | | - # 'pointsize': '10pt', |
144 | | - |
145 | | - # Additional stuff for the LaTeX preamble. |
146 | | - # |
147 | | - # 'preamble': '', |
148 | | - |
149 | | - # Latex figure (float) alignment |
150 | | - # |
151 | | - # 'figure_align': 'htbp', |
152 | | -} |
| 75 | +latex_elements = {} |
153 | 76 |
|
154 | | -# Grouping the document tree into LaTeX files. List of tuples |
155 | | -# (source start file, target name, title, |
156 | | -# author, documentclass [howto, manual, or own class]). |
157 | 77 | latex_documents = [ |
158 | 78 | ( |
159 | 79 | master_doc, 'ProjectTrellis.tex', u'Project Trellis Documentation', |
|
162 | 82 |
|
163 | 83 | # -- Options for manual page output --------------------------------------- |
164 | 84 |
|
165 | | -# One entry per manual page. List of tuples |
166 | | -# (source start file, name, description, authors, manual section). |
167 | 85 | man_pages = [ |
168 | 86 | (master_doc, 'projecttrellis', u'Project Trellis Documentation', [author], 1) |
169 | 87 | ] |
170 | 88 |
|
171 | 89 | # -- Options for Texinfo output ------------------------------------------- |
172 | 90 |
|
173 | | -# Grouping the document tree into Texinfo files. List of tuples |
174 | | -# (source start file, target name, title, author, |
175 | | -# dir menu entry, description, category) |
176 | 91 | texinfo_documents = [ |
177 | 92 | ( |
178 | 93 | master_doc, 'ProjectTrellis', u'Project Trellis Documentation', author, |
179 | 94 | 'ProjectTrellis', 'One line description of project.', 'Miscellaneous'), |
180 | 95 | ] |
181 | 96 |
|
182 | | -# Example configuration for intersphinx: refer to the Python standard library. |
183 | 97 | intersphinx_mapping = {'https://docs.python.org/': None} |
184 | 98 |
|
185 | 99 |
|
|
0 commit comments