conf.py 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. # -*- coding: utf-8 -*-
  2. #
  3. # datalad_gooey documentation build configuration file, created by
  4. # sphinx-quickstart on Tue Oct 13 08:41:19 2015.
  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.
  14. import sys
  15. import subprocess
  16. import datetime
  17. from os.path import (
  18. abspath,
  19. dirname,
  20. exists,
  21. join as opj,
  22. )
  23. from os import pardir
  24. import datalad_gooey
  25. # If extensions (or modules to document with autodoc) are in another directory,
  26. # add these directories to sys.path here. If the directory is relative to the
  27. # documentation root, use os.path.abspath to make it absolute, like shown here.
  28. #sys.path.insert(0, os.path.abspath('.'))
  29. # generate missing pieces
  30. for setup_py_path in (opj(pardir, 'setup.py'), # travis
  31. opj(pardir, pardir, 'setup.py')): # RTD
  32. if exists(setup_py_path):
  33. sys.path.insert(0, abspath(dirname(setup_py_path)))
  34. # Build manpage
  35. try:
  36. subprocess.run(
  37. args=[setup_py_path, 'build_manpage',
  38. '--cmdsuite', 'datalad_gooey:command_suite',
  39. '--manpath', abspath(opj(
  40. dirname(setup_py_path), 'build', 'man')),
  41. '--rstpath', opj(dirname(__file__), 'generated', 'man'),
  42. ],
  43. check=True,
  44. )
  45. except (FileNotFoundError, subprocess.CalledProcessError):
  46. # shut up and do your best
  47. pass
  48. # -- General configuration ------------------------------------------------
  49. # If your documentation needs a minimal Sphinx version, state it here.
  50. #needs_sphinx = '1.0'
  51. # Add any Sphinx extension module names here, as strings. They can be
  52. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  53. # ones.
  54. extensions = [
  55. 'sphinx.ext.autodoc',
  56. 'sphinx.ext.autosummary',
  57. 'sphinx.ext.doctest',
  58. 'sphinx.ext.intersphinx',
  59. 'sphinx.ext.todo',
  60. 'sphinx.ext.coverage',
  61. 'sphinx.ext.mathjax',
  62. 'sphinx.ext.ifconfig',
  63. 'sphinx.ext.inheritance_diagram',
  64. 'sphinx.ext.viewcode',
  65. 'sphinx.ext.napoleon',
  66. ]
  67. # for the module reference
  68. autosummary_generate = True
  69. # Add any paths that contain templates here, relative to this directory.
  70. templates_path = ['_templates']
  71. # The suffix(es) of source filenames.
  72. # You can specify multiple suffix as a list of string:
  73. # source_suffix = ['.rst', '.md']
  74. source_suffix = '.rst'
  75. # The master toctree document.
  76. master_doc = 'index'
  77. # General information about the project.
  78. project = u'Datalad Extension Template'
  79. copyright = u'2018-{}, DataLad team'.format(datetime.datetime.now().year)
  80. author = u'DataLad team'
  81. # The version info for the project you're documenting, acts as replacement for
  82. # |version| and |release|, also used in various other places throughout the
  83. # built documents.
  84. version = datalad_gooey.__version__
  85. release = version
  86. # The language for content autogenerated by Sphinx. Refer to documentation
  87. # for a list of supported languages.
  88. #
  89. # This is also used if you do content translation via gettext catalogs.
  90. # Usually you set "language" from the command line for these cases.
  91. language = 'en'
  92. # List of patterns, relative to source directory, that match files and
  93. # directories to ignore when looking for source files.
  94. exclude_patterns = []
  95. # The name of the Pygments (syntax highlighting) style to use.
  96. pygments_style = 'sphinx'
  97. # If true, `todo` and `todoList` produce output, else they produce nothing.
  98. todo_include_todos = True
  99. # Example configuration for intersphinx: refer to the Python standard library.
  100. intersphinx_mapping = {'https://docs.python.org/': None}
  101. # -- Options for HTML output ----------------------------------------------
  102. # The theme to use for HTML and HTML Help pages. See the documentation for
  103. # a list of builtin themes.
  104. html_theme = 'sphinx_rtd_theme'
  105. # The name of an image file (relative to this directory) to place at the top
  106. # of the sidebar.
  107. html_logo = '_static/datalad_gooey_logo.svg'
  108. # Add any paths that contain custom static files (such as style sheets) here,
  109. # relative to this directory. They are copied after the builtin static files,
  110. # so a file named "default.css" will overwrite the builtin "default.css".
  111. html_static_path = ['_static']
  112. # If true, the index is split into individual pages for each letter.
  113. html_split_index = True
  114. # If true, links to the reST sources are added to the pages.
  115. html_show_sourcelink = False
  116. # smart quotes are incompatible with the RST flavor of the generated manpages
  117. # but see `smartquotes_action` for more fine-grained control, in case
  118. # some of this functionality is needed
  119. smartquotes = False