conf.py 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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. # -- Path setup --------------------------------------------------------------
  9. # If extensions (or modules to document with autodoc) are in another directory,
  10. # add these directories to sys.path here. If the directory is relative to the
  11. # documentation root, use os.path.abspath to make it absolute, like shown here.
  12. #
  13. import os
  14. import sys
  15. import asteroid_sphinx_theme
  16. sys.path.insert(0, os.path.abspath('../../../macop'))
  17. from macop import __version__
  18. # -- Project information -----------------------------------------------------
  19. project = 'Macop'
  20. copyright = '2021, Jérôme BUISINE'
  21. author = 'Jérôme BUISINE'
  22. # The short X.Y version
  23. version = __version__
  24. # The full version, including alpha/beta/rc tags
  25. release = __version__
  26. # -- General configuration ---------------------------------------------------
  27. # If your documentation needs a minimal Sphinx version, state it here.
  28. #
  29. # needs_sphinx = '1.0'
  30. # Add any Sphinx extension module names here, as strings. They can be
  31. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  32. # ones.
  33. extensions = [
  34. 'sphinx.ext.autodoc',
  35. 'sphinx.ext.doctest',
  36. 'sphinx.ext.coverage',
  37. 'sphinx.ext.napoleon',
  38. 'sphinx.ext.autosummary',
  39. 'sphinx.ext.viewcode',
  40. 'sphinx.ext.coverage',
  41. 'sphinx.ext.intersphinx',
  42. #'sphinx.ext.pngmath',
  43. #'autoapi.extension'
  44. ]
  45. # Enable numref
  46. numfig = True
  47. # These folders are copied to the documentation's HTML output
  48. html_static_path = ['_static']
  49. # These paths are either relative to html_static_path
  50. # or fully qualified paths (eg. https://...)
  51. html_css_files = [
  52. 'css/custom.css',
  53. ]
  54. html_js_files = [
  55. 'js/custom.js',
  56. ]
  57. # autoapi_add_toctree_entry = True
  58. # autoapi_template_dir = '_autoapi_templates'
  59. # autoapi_dirs = ['../../rawls']
  60. autosummary_generate = True
  61. autodoc_default_flags = ['class', 'members', 'inherited-members', 'show-inheritance']
  62. autodoc_member_order = 'groupwise'
  63. # Add any paths that contain templates here, relative to this directory.
  64. templates_path = ['_templates']
  65. # The suffix(es) of source filenames.
  66. # You can specify multiple suffix as a list of string:
  67. #
  68. # source_suffix = ['.rst', '.md']
  69. source_suffix = '.rst'
  70. # The master toctree document.
  71. master_doc = 'index'
  72. # The language for content autogenerated by Sphinx. Refer to documentation
  73. # for a list of supported languages.
  74. #
  75. # This is also used if you do content translation via gettext catalogs.
  76. # Usually you set "language" from the command line for these cases.
  77. language = None
  78. # List of patterns, relative to source directory, that match files and
  79. # directories to ignore when looking for source files.
  80. # This pattern also affects html_static_path and html_extra_path.
  81. exclude_patterns = []
  82. # The name of the Pygments (syntax highlighting) style to use.
  83. pygments_style = 'default'
  84. # -- Options for HTML output -------------------------------------------------
  85. # The theme to use for HTML and HTML Help pages. See the documentation for
  86. # a list of builtin themes.
  87. #
  88. #html_theme = 'sphinx_rtd_theme'
  89. #html_theme = 'divio_docs_theme'
  90. html_theme = 'asteroid_sphinx_theme' # use the theme in subdir 'theme'
  91. # html_theme_path = ['.'] # make sphinx search for themes in current dir
  92. # Theme options are theme-specific and customize the look and feel of a theme
  93. # further. For a list of options available for each theme, see the
  94. # documentation.
  95. #
  96. # html_theme_options = {}
  97. html_theme_options = {
  98. 'canonical_url': '',
  99. #'analytics_id': 'UA-XXXXXXX-1',
  100. 'logo_only': False,
  101. 'display_version': True,
  102. 'prev_next_buttons_location': 'bottom',
  103. 'style_external_links': False,
  104. #'vcs_pageview_mode': '',
  105. # Toc options
  106. 'collapse_navigation': True,
  107. 'sticky_navigation': True,
  108. 'navigation_depth': 4,
  109. 'includehidden': True,
  110. 'titles_only': False
  111. }
  112. html_context = {
  113. 'display_github': True,
  114. 'github_user': 'prise-3d',
  115. 'github_repo': 'macop',
  116. 'github_version': 'master/docs/source/'
  117. }
  118. # Add any paths that contain custom static files (such as style sheets) here,
  119. # relative to this directory. They are copied after the builtin static files,
  120. # so a file named "default.css" will overwrite the builtin "default.css".
  121. html_static_path = ['_static']
  122. # Custom sidebar templates, must be a dictionary that maps document names
  123. # to template names.
  124. #
  125. # The default sidebars (for documents that don't match any pattern) are
  126. # defined by theme itself. Builtin themes are using these templates by
  127. # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
  128. # 'searchbox.html']``.
  129. #
  130. # html_sidebars = {}
  131. # html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'] }
  132. html_sidebars = {'**': ['fulltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']}
  133. # -- Options for HTMLHelp output ---------------------------------------------
  134. # Output file base name for HTML help builder.
  135. htmlhelp_basename = 'macopdoc'
  136. # -- Options for LaTeX output ------------------------------------------------
  137. latex_elements = {
  138. # The paper size ('letterpaper' or 'a4paper').
  139. #
  140. # 'papersize': 'letterpaper',
  141. # The font size ('10pt', '11pt' or '12pt').
  142. #
  143. # 'pointsize': '10pt',
  144. # Additional stuff for the LaTeX preamble.
  145. #
  146. # 'preamble': '',
  147. # Latex figure (float) alignment
  148. #
  149. # 'figure_align': 'htbp',
  150. }
  151. # Grouping the document tree into LaTeX files. List of tuples
  152. # (source start file, target name, title,
  153. # author, documentclass [howto, manual, or own class]).
  154. latex_documents = [
  155. (master_doc, 'macop.tex', 'macop Documentation',
  156. 'Jérôme BUISINE', 'manual'),
  157. ]
  158. # -- Options for manual page output ------------------------------------------
  159. # One entry per manual page. List of tuples
  160. # (source start file, name, description, authors, manual section).
  161. man_pages = [
  162. (master_doc, 'macop', 'macop Documentation',
  163. [author], 1)
  164. ]
  165. # -- Options for Texinfo output ----------------------------------------------
  166. # Grouping the document tree into Texinfo files. List of tuples
  167. # (source start file, target name, title, author,
  168. # dir menu entry, description, category)
  169. texinfo_documents = [
  170. (master_doc, 'macop', 'macop Documentation',
  171. author, 'macop', 'Minimalist And Customisable Optimisation Package',
  172. 'Miscellaneous'),
  173. ]
  174. # -- Options for Epub output -------------------------------------------------
  175. # Bibliographic Dublin Core info.
  176. epub_title = project
  177. # The unique identifier of the text. This can be a ISBN number
  178. # or the project homepage.
  179. #
  180. # epub_identifier = ''
  181. # A unique identification for the text.
  182. #
  183. # epub_uid = ''
  184. # A list of files that should not be packed into the epub file.
  185. epub_exclude_files = ['search.html']
  186. # -- Extension configuration -------------------------------------------------