|
19 | 19 | # |
20 | 20 | import os |
21 | 21 | import sys |
22 | | -sys.path.insert(0, os.path.abspath('../..')) |
| 22 | + |
| 23 | +root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")) |
| 24 | +sys.path.insert(0, root_dir) |
23 | 25 | # print(sys.path) |
24 | 26 |
|
25 | 27 | # -- General configuration ------------------------------------------------ |
|
31 | 33 | # Add any Sphinx extension module names here, as strings. They can be |
32 | 34 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
33 | 35 | # ones. |
34 | | -extensions = ['sphinx.ext.autodoc', |
35 | | - 'sphinx.ext.autosummary', |
36 | | - 'sphinx.ext.napoleon', |
37 | | - 'sphinx.ext.doctest', |
38 | | - 'sphinx.ext.coverage', |
39 | | - 'sphinx.ext.mathjax', |
40 | | - 'sphinx.ext.viewcode', |
41 | | - 'sphinxcontrib.bibtex'] |
| 36 | +extensions = [ |
| 37 | + "sphinx.ext.autodoc", |
| 38 | + "sphinx.ext.autosummary", |
| 39 | + "sphinx.ext.napoleon", |
| 40 | + "sphinx.ext.doctest", |
| 41 | + "sphinx.ext.coverage", |
| 42 | + "sphinx.ext.mathjax", |
| 43 | + "sphinx.ext.viewcode", |
| 44 | + "sphinxcontrib.bibtex", |
| 45 | +] |
42 | 46 |
|
43 | 47 | # Add any paths that contain templates here, relative to this directory. |
44 | | -templates_path = ['ytemplates'] |
| 48 | +templates_path = ["ytemplates"] |
45 | 49 |
|
46 | 50 | # The suffix(es) of source filenames. |
47 | 51 | # You can specify multiple suffix as a list of string: |
48 | 52 | # |
49 | 53 | # source_suffix = ['.rst', '.md'] |
50 | | -source_suffix = '.rst' |
| 54 | +source_suffix = ".rst" |
51 | 55 |
|
52 | 56 | # The master toctree document. |
53 | | -master_doc = 'index' |
| 57 | +master_doc = "index" |
54 | 58 |
|
55 | 59 | # General information about the project. |
56 | | -project = 'graphtools' |
57 | | -copyright = '2018 Krishnaswamy Lab, Yale University' |
58 | | -author = 'Jay Stanley and Scott Gigante, Krishnaswamy Lab, Yale University' |
| 60 | +project = "graphtools" |
| 61 | +copyright = "2018 Krishnaswamy Lab, Yale University" |
| 62 | +author = "Scott Gigante and Jay Stanley, Yale University" |
59 | 63 |
|
60 | 64 | # The version info for the project you're documenting, acts as replacement for |
61 | 65 | # |version| and |release|, also used in various other places throughout the |
62 | 66 | # built documents. |
63 | 67 | # |
64 | | -# The short X.Y version. |
65 | | -version = '0.1.3' |
| 68 | +version_py = os.path.join(root_dir, "graphtools", "version.py") |
66 | 69 | # The full version, including alpha/beta/rc tags. |
67 | | -release = '0.1.3' |
| 70 | +release = open(version_py).read().strip().split("=")[-1].replace('"', "").strip() |
| 71 | +# The short X.Y version. |
| 72 | +version = release.split("-")[0] |
68 | 73 |
|
69 | 74 | # The language for content autogenerated by Sphinx. Refer to documentation |
70 | 75 | # for a list of supported languages. |
|
79 | 84 | exclude_patterns = [] |
80 | 85 |
|
81 | 86 | # The name of the Pygments (syntax highlighting) style to use. |
82 | | -pygments_style = 'sphinx' |
| 87 | +pygments_style = "sphinx" |
83 | 88 |
|
84 | 89 | # If true, `todo` and `todoList` produce output, else they produce nothing. |
85 | 90 | todo_include_todos = False |
|
90 | 95 | # The theme to use for HTML and HTML Help pages. See the documentation for |
91 | 96 | # a list of builtin themes. |
92 | 97 | # |
93 | | -html_theme = 'default' |
| 98 | +html_theme = "default" |
94 | 99 |
|
95 | 100 | # Theme options are theme-specific and customize the look and feel of a theme |
96 | 101 | # further. For a list of options available for each theme, see the |
|
101 | 106 | # Add any paths that contain custom static files (such as style sheets) here, |
102 | 107 | # relative to this directory. They are copied after the builtin static files, |
103 | 108 | # so a file named "default.css" will overwrite the builtin "default.css". |
104 | | -html_static_path = ['ystatic'] |
| 109 | +html_static_path = ["ystatic"] |
105 | 110 |
|
106 | 111 |
|
107 | 112 | # -- Options for HTMLHelp output ------------------------------------------ |
108 | 113 |
|
109 | 114 | # Output file base name for HTML help builder. |
110 | | -htmlhelp_basename = 'graphtoolsdoc' |
| 115 | +htmlhelp_basename = "graphtoolsdoc" |
111 | 116 |
|
112 | 117 |
|
113 | 118 | # -- Options for LaTeX output --------------------------------------------- |
|
116 | 121 | # The paper size ('letterpaper' or 'a4paper'). |
117 | 122 | # |
118 | 123 | # 'papersize': 'letterpaper', |
119 | | - |
120 | 124 | # The font size ('10pt', '11pt' or '12pt'). |
121 | 125 | # |
122 | 126 | # 'pointsize': '10pt', |
123 | | - |
124 | 127 | # Additional stuff for the LaTeX preamble. |
125 | 128 | # |
126 | 129 | # 'preamble': '', |
127 | | - |
128 | 130 | # Latex figure (float) alignment |
129 | 131 | # |
130 | 132 | # 'figure_align': 'htbp', |
|
134 | 136 | # (source start file, target name, title, |
135 | 137 | # author, documentclass [howto, manual, or own class]). |
136 | 138 | latex_documents = [ |
137 | | - (master_doc, 'graphtools.tex', 'graphtools Documentation', |
138 | | - 'Jay Stanley and Scott Gigante, Krishnaswamy Lab, Yale University', 'manual'), |
| 139 | + ( |
| 140 | + master_doc, |
| 141 | + "graphtools.tex", |
| 142 | + "graphtools Documentation", |
| 143 | + "Scott Gigante and Jay Stanley, Yale University", |
| 144 | + "manual", |
| 145 | + ), |
139 | 146 | ] |
140 | 147 |
|
141 | 148 |
|
142 | 149 | # -- Options for manual page output --------------------------------------- |
143 | 150 |
|
144 | 151 | # One entry per manual page. List of tuples |
145 | 152 | # (source start file, name, description, authors, manual section). |
146 | | -man_pages = [ |
147 | | - (master_doc, 'graphtools', 'graphtools Documentation', |
148 | | - [author], 1) |
149 | | -] |
| 153 | +man_pages = [(master_doc, "graphtools", "graphtools Documentation", [author], 1)] |
150 | 154 |
|
151 | 155 |
|
152 | 156 | # -- Options for Texinfo output ------------------------------------------- |
|
155 | 159 | # (source start file, target name, title, author, |
156 | 160 | # dir menu entry, description, category) |
157 | 161 | texinfo_documents = [ |
158 | | - (master_doc, 'graphtools', 'graphtools Documentation', |
159 | | - author, 'graphtools', 'One line description of project.', |
160 | | - 'Miscellaneous'), |
| 162 | + ( |
| 163 | + master_doc, |
| 164 | + "graphtools", |
| 165 | + "graphtools Documentation", |
| 166 | + author, |
| 167 | + "graphtools", |
| 168 | + "One line description of project.", |
| 169 | + "Miscellaneous", |
| 170 | + ), |
161 | 171 | ] |
0 commit comments