Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
autodoxy: allow to requalify types whose namespace is implicit in doxygen
[simgrid.git] / docs / source / conf.py
1 # -*- coding: utf-8 -*-
2 #
3 # Configuration file for the Sphinx documentation builder.
4 #
5 # This file does only contain a selection of the most common options. For a
6 # full list see the documentation:
7 # http://www.sphinx-doc.org/en/master/config
8
9 # -- Path setup --------------------------------------------------------------
10
11 # If extensions (or modules to document with autodoc) are in another directory,
12 # add these directories to sys.path here. If the directory is relative to the
13 # documentation root, use os.path.abspath to make it absolute, like shown here.
14 #
15 import os
16 import subprocess
17
18 # Search for our extensions too
19 import sys
20 sys.path.append(os.path.abspath('_ext'))
21
22 # -- Run doxygen on readthedocs.org ------------------------------------------
23
24 read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
25
26 if read_the_docs_build:
27     subprocess.call('pwd', shell=True) # should be in docs/source
28     subprocess.call('doxygen', shell=True)
29     subprocess.call('javasphinx-apidoc --force -o java/ ../../src/bindings/java/org/simgrid/msg', shell=True)
30     subprocess.call('rm java/packages.rst', shell=True)
31
32 # -- Project information -----------------------------------------------------
33
34 project = u'SimGrid'
35 copyright = u'2002-2020, The SimGrid Team'
36 author = u'The SimGrid Team'
37
38 # The short X.Y version
39 version = u'3.25.1'
40
41 # -- General configuration ---------------------------------------------------
42
43 # If your documentation needs a minimal Sphinx version, state it here.
44 #
45 # needs_sphinx = '1.0'
46
47 # Add any Sphinx extension module names here, as strings. They can be
48 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
49 # ones.
50 extensions = [
51     'sphinx.ext.todo',
52     'breathe',
53     'sphinx.ext.autodoc',
54     'sphinx.ext.intersphinx',
55     'sphinx.ext.autosummary',
56     'sphinx_tabs.tabs',
57     'javasphinx',
58     'showfile',
59     'autodoxy',
60 ]
61
62 todo_include_todos = True
63
64 # Setup the breath extension
65 breathe_projects = {'simgrid': '../build/xml'}
66 breathe_default_project = "simgrid"
67
68 # Setup the autodoxy extension
69 doxygen_xml = os.path.join(os.path.dirname(__file__), "..", "build", "xml")
70 autodoxy_requalified_identifiers =  [ # The first element will be substituted into the second one if it's starting an element or preceded by a space
71     ("ActorPtr", "simgrid::s4u::ActorPtr"),
72     ("Actor", "simgrid::s4u::Actor"),
73     ("CommPtr", "simgrid::s4u::CommPtr"),
74     ("Disk", "simgrid::s4u::Disk"),
75     ("ExecPtr", "simgrid::s4u::ExecPtr"),
76     ("Host", "simgrid::s4u::Host"),
77     ("s4u::Host", "simgrid::s4u::Host"),
78     ("Engine", "simgrid::s4u::Engine"),
79     ("Link", "simgrid::s4u::Link"),
80     ("Mailbox", "simgrid::s4u::Mailbox"),
81     ("Mutex", "simgrid::s4u::Mutex"),
82     ("s4u::Mutex", "simgrid::s4u::Mutex"),
83     ("NetZone", "simgrid::s4u::NetZone"),
84     ("Semaphore", "simgrid::s4u::Semaphore"),
85   ]
86
87 # Generate a warning for all a cross-reference (such as :func:`myfunc`) that cannot be found
88 nitpicky = True
89 nitpick_ignore = [
90   ('cpp:identifier', 'boost'),
91   ('cpp:identifier', 'kernel'),
92   ('cpp:identifier', 'simgrid'),
93   ('cpp:identifier', 'simgrid::s4u'),
94   ('cpp:identifier', 'this_actor'),
95   ('cpp:identifier', 's4u'),
96   ('cpp:identifier', 'size_t'),
97   ('cpp:identifier', 'uint64_t'),
98   ('cpp:identifier', 'xbt'),
99   ('cpp:identifier', 'xbt::string'),
100 ]
101
102 # For cross-ref generation
103 primary_domain = 'cpp'
104
105 # Add any paths that contain templates here, relative to this directory.
106 templates_path = ['_templates']
107
108 # The suffix(es) of source filenames.
109 # You can specify multiple suffix as a list of string: ['.rst', '.md']
110 source_suffix = '.rst'
111
112 # The master toctree document.
113 master_doc = 'index'
114
115 # The language for content autogenerated by Sphinx. Refer to documentation
116 # for a list of supported languages.
117 #
118 # This is also used if you do content translation via gettext catalogs.
119 # Usually you set "language" from the command line for these cases.
120 language = None
121
122 # List of patterns, relative to source directory, that match files and
123 # directories to ignore when looking for source files.
124 # This pattern also affects html_static_path and html_extra_path .
125 exclude_patterns = []
126
127 # The name of the Pygments (syntax highlighting) style to use.
128 pygments_style = 'sphinx'
129
130 # -- Options for HTML output -------------------------------------------------
131
132 # The theme to use for HTML and HTML Help pages.  See the documentation for
133 # a list of builtin themes.
134 #
135 html_theme = 'sphinx_rtd_theme'
136
137 # Theme options are theme-specific and customize the look and feel of a theme
138 # further.  For a list of options available for each theme, see the
139 # documentation.
140 #
141 html_theme_options = {
142     'navigation_depth': 4,
143     'sticky_navigation': True,
144     'display_version': True,
145     'includehidden': True,
146 }
147
148 # Add any paths that contain custom static files (such as style sheets) here,
149 # relative to this directory. They are copied after the builtin static files,
150 # so a file named "default.css" will overwrite the builtin "default.css".
151 html_static_path = ['_static']
152
153 # Custom sidebar templates, must be a dictionary that maps document names
154 # to template names.
155 #
156 # The default sidebars (for documents that don't match any pattern) are
157 # defined by theme itself.  Builtin themes are using these templates by
158 # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
159 # 'searchbox.html']``.
160 #
161 # html_sidebars = {'**': ['localtoc.html', 'relations.html', 'searchbox.html']}
162
163 # -- Options for HTMLHelp output ---------------------------------------------
164
165 # Output file base name for HTML help builder.
166 htmlhelp_basename = 'simgrid-doc'
167
168 # -- Options for GitLab integration ------------------------------------------
169
170 html_context = {
171     "display_gitlab": True,  # Integrate Gitlab
172     "gitlab_host": "framagit.org",
173     "gitlab_user": "simgrid",
174     "gitlab_repo": "simgrid",
175     "gitlab_version": "master",  # Version
176     "conf_py_path": "/docs/source/",  # Path in the checkout to the docs root
177 }
178
179 html_css_files = [
180     'css/custom.css',
181 ]
182
183 # -- Other options
184