|
14 | 14 | import pathlib
|
15 | 15 | import time
|
16 | 16 |
|
17 |
| -# Load the dummy profile even if we are running locally, this way the documentation will succeed even if the current |
18 |
| -# default profile of the AiiDA installation does not use a Django backend. |
19 | 17 | from aiida.manage.configuration import load_documentation_profile
|
20 | 18 |
|
| 19 | +load_documentation_profile() |
21 | 20 | # If extensions (or modules to document with autodoc) are in another directory,
|
22 | 21 | # add these directories to sys.path here. If the directory is relative to the
|
23 | 22 | # documentation root, use os.path.abspath to make it absolute, like shown here.
|
24 |
| -import aiida_quantumespresso |
25 |
| - |
26 |
| -load_documentation_profile() |
27 | 23 |
|
28 | 24 | # -- Project information -----------------------------------------------------
|
29 | 25 |
|
|
32 | 28 | Materials (THEOS) and National Centre for Computational Design and Discovery of Novel Materials (NCCR MARVEL)),
|
33 | 29 | Switzerland. All rights reserved"""
|
34 | 30 |
|
35 |
| -# The full version, including alpha/beta/rc tags. |
36 |
| -release = aiida_quantumespresso.__version__ |
37 |
| -# The short X.Y version. |
38 |
| -version = '.'.join(aiida_quantumespresso.__version__.split('.')[:2]) |
39 |
| - |
40 | 31 | # -- General configuration ------------------------------------------------
|
41 | 32 |
|
42 | 33 | # If your documentation needs a minimal Sphinx version, state it here.
|
|
46 | 37 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
47 | 38 | # ones.
|
48 | 39 | extensions = [
|
49 |
| - 'sphinx.ext.autodoc', |
50 | 40 | 'sphinx.ext.mathjax',
|
51 | 41 | 'sphinx.ext.intersphinx',
|
52 | 42 | 'sphinx.ext.viewcode',
|
|
61 | 51 | # Setting the intersphinx mapping to other readthedocs
|
62 | 52 | intersphinx_mapping = {
|
63 | 53 | 'python': ('https://docs.python.org/3.8', None),
|
64 |
| - 'aiida': ('https://aiida.readthedocs.io/en/latest/', None), |
| 54 | + 'aiida': ('https://aiida.readthedocs.io/projects/aiida-core/en/latest/', None), |
65 | 55 | 'aiida_pseudo': ('http://aiida-pseudo.readthedocs.io/en/latest/', None),
|
66 |
| - 'sphinx': ('https://www.sphinx-doc.org/en/master', None), |
67 | 56 | }
|
68 | 57 |
|
69 | 58 | myst_enable_extensions = [
|
|
72 | 61 | 'substitution'
|
73 | 62 | ]
|
74 | 63 |
|
75 |
| -myst_substitutions = { |
76 |
| - 'release': release, |
77 |
| - 'version': version |
78 |
| -} |
79 |
| - |
80 | 64 | # Settings for the `autoapi.extenstion` automatically generating API docs
|
81 | 65 | filepath_docs = pathlib.Path(__file__).parent.parent
|
82 | 66 | filepath_src = filepath_docs.parent / 'src'
|
83 | 67 | autoapi_type = 'python'
|
84 | 68 | autoapi_dirs = [filepath_src]
|
85 | 69 | autoapi_ignore = [filepath_src / 'aiida_quantumespresso' / '*cli*']
|
86 |
| -autoapi_root = str(filepath_docs / 'source' / 'reference' / 'api') |
| 70 | +autoapi_root = str(filepath_docs / 'source' / 'reference' / 'api' / 'auto') |
87 | 71 | autoapi_keep_files = True
|
88 | 72 | autoapi_add_toctree_entry = False
|
89 | 73 |
|
|
104 | 88 |
|
105 | 89 | # List of patterns, relative to source directory, that match files and
|
106 | 90 | # directories to ignore when looking for source files.
|
107 |
| -exclude_patterns = [] |
| 91 | +exclude_patterns = ['**.ipynb_checkpoints', 'reference/api/auto/aiida_quantumespresso/index.rst'] |
108 | 92 |
|
109 | 93 | # -- Options for HTML output ----------------------------------------------
|
110 | 94 |
|
111 | 95 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
112 | 96 | # a list of builtin themes.
|
113 | 97 |
|
114 |
| -html_theme = 'pydata_sphinx_theme' |
| 98 | +html_theme = 'sphinx_book_theme' |
115 | 99 | html_theme_options = {
|
| 100 | + 'repository_url': 'https://github.com/aiidateam/aiida-quantumespresso', |
116 | 101 | 'github_url': 'https://github.com/aiidateam/aiida-quantumespresso',
|
117 | 102 | 'twitter_url': 'https://twitter.com/aiidateam',
|
118 | 103 | 'use_edit_page_button': True,
|
| 104 | + 'logo': { |
| 105 | + 'text': 'AiiDA Quantum ESPRESSO', |
| 106 | + 'image_light': '_static/logo_aiida_quantumespresso-light.png', |
| 107 | + 'image_dark': '_static/logo_aiida_quantumespresso-dark.png', |
| 108 | + } |
119 | 109 | }
|
120 | 110 | html_static_path = ['_static']
|
121 | 111 | html_context = {
|
|
125 | 115 | 'doc_path': 'docs/source',
|
126 | 116 | 'default_mode': 'light',
|
127 | 117 | }
|
| 118 | +html_sidebars = { |
| 119 | + '**': ['navbar-logo.html', 'navbar-icon-links.html', 'search-field.html', 'sbt-sidebar-nav.html'] |
| 120 | +} |
128 | 121 |
|
129 | 122 | # The name of an image file (relative to this directory) to place at the top
|
130 | 123 | # of the sidebar.
|
131 |
| -html_logo = 'images/logo_docs.png' |
132 | 124 | html_static_path = ['_static']
|
133 | 125 | html_css_files = ['aiida-custom.css', 'aiida-qe-custom.css']
|
134 | 126 |
|
|
146 | 138 | # Output file base name for HTML help builder.
|
147 | 139 | htmlhelp_basename = 'aiida-quantumespressodoc'
|
148 | 140 |
|
149 |
| -# -- Options for LaTeX output --------------------------------------------- |
150 |
| - |
151 |
| -latex_elements = { |
152 |
| - # The paper size ('letterpaper' or 'a4paper'). |
153 |
| - #'papersize': 'letterpaper', |
154 |
| - |
155 |
| - # The font size ('10pt', '11pt' or '12pt'). |
156 |
| - #'pointsize': '10pt', |
157 |
| - |
158 |
| - # Additional stuff for the LaTeX preamble. |
159 |
| - #'preamble': '', |
160 |
| - |
161 |
| - # Latex figure (float) alignment |
162 |
| - #'figure_align': 'htbp', |
163 |
| -} |
164 |
| - |
165 |
| -# Grouping the document tree into LaTeX files. List of tuples |
166 |
| -# (source start file, target name, title, |
167 |
| -# author, documentclass [howto, manual, or own class]). |
168 |
| -# latex_documents = [ |
169 |
| -# ] |
170 |
| - |
171 |
| -# The name of an image file (relative to this directory) to place at the top of |
172 |
| -# the title page. |
173 |
| -#latex_logo = None |
174 |
| - |
175 |
| -# For "manual" documents, if this is true, then toplevel headings are parts, |
176 |
| -# not chapters. |
177 |
| -#latex_use_parts = False |
178 |
| - |
179 |
| -# If true, show page references after internal links. |
180 |
| -#latex_show_pagerefs = False |
181 |
| - |
182 |
| -# If true, show URL addresses after external links. |
183 |
| -#latex_show_urls = False |
184 |
| - |
185 |
| -# Documents to append as an appendix to all manuals. |
186 |
| -#latex_appendices = [] |
187 |
| - |
188 |
| -# If false, no module index is generated. |
189 |
| -#latex_domain_indices = True |
190 |
| - |
191 |
| -# -- Options for manual page output --------------------------------------- |
192 |
| - |
193 |
| -# One entry per manual page. List of tuples |
194 |
| -# (source start file, name, description, authors, manual section). |
195 |
| -# man_pages = [ |
196 |
| -# ] |
197 |
| - |
198 |
| -# If true, show URL addresses after external links. |
199 |
| -#man_show_urls = False |
200 |
| - |
201 |
| -# -- Options for Texinfo output ------------------------------------------- |
202 |
| - |
203 |
| -# Grouping the document tree into Texinfo files. List of tuples |
204 |
| -# (source start file, target name, title, author, |
205 |
| -# dir menu entry, description, category) |
206 |
| -# texinfo_documents = [ |
207 |
| -# ] |
208 |
| - |
209 |
| -# Documents to append as an appendix to all manuals. |
210 |
| -#texinfo_appendices = [] |
211 |
| - |
212 |
| -# If false, no module index is generated. |
213 |
| -#texinfo_domain_indices = True |
214 |
| - |
215 |
| -# How to display URL addresses: 'footnote', 'no', or 'inline'. |
216 |
| -#texinfo_show_urls = 'footnote' |
217 |
| - |
218 |
| -# If true, do not generate a @detailmenu in the "Top" node's menu. |
219 |
| -#texinfo_no_detailmenu = False |
| 141 | +# ------------------------------------------------------------------------------ |
220 | 142 |
|
221 | 143 | # Warnings to ignore when using the -n (nitpicky) option
|
222 | 144 | # We should ignore any python built-in exception, for instance
|
| 145 | +nitpicky = True |
| 146 | + |
| 147 | +nitpick_ignore_regex = [ |
| 148 | + (r'py:.*', r'pydantic.*'), |
| 149 | + (r'py:.*', r'con.*'), |
| 150 | + (r'.*', r'Literal.*'), |
| 151 | + (r'.*', r'Tuple.*'), |
| 152 | +] |
223 | 153 | nitpick_ignore = [
|
224 | 154 | ('py:exc', 'ArithmeticError'),
|
225 | 155 | ('py:exc', 'AssertionError'),
|
|
0 commit comments