conf.py 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. # -*- coding: utf-8 -*-
  2. #
  3. # PbsTestLab documentation build configuration file, created by
  4. # sphinx-quickstart on Fri May 27 11:57:52 2016.
  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. # Copyright (C) 1994-2018 Altair Engineering, Inc.
  15. # For more information, contact Altair at www.altair.com.
  16. #
  17. # This file is part of the PBS Professional ("PBS Pro") software.
  18. #
  19. # Open Source License Information:
  20. #
  21. # PBS Pro is free software. You can redistribute it and/or modify it under the
  22. # terms of the GNU Affero General Public License as published by the Free
  23. # Software Foundation, either version 3 of the License, or (at your option) any
  24. # later version.
  25. #
  26. # PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
  27. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  28. # FOR A PARTICULAR PURPOSE.
  29. # See the GNU Affero General Public License for more details.
  30. #
  31. # You should have received a copy of the GNU Affero General Public License
  32. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  33. #
  34. # Commercial License Information:
  35. #
  36. # For a copy of the commercial license terms and conditions,
  37. # go to: (http://www.pbspro.com/UserArea/agreement.html)
  38. # or contact the Altair Legal Department.
  39. #
  40. # Altair’s dual-license business model allows companies, individuals, and
  41. # organizations to create proprietary derivative works of PBS Pro and
  42. # distribute them - whether embedded or bundled with other software -
  43. # under a commercial license agreement.
  44. #
  45. # Use of Altair’s trademarks, including but not limited to "PBS™",
  46. # "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
  47. # trademark licensing policies.
  48. import sys
  49. import os
  50. HAS_RTD = False
  51. try:
  52. import sphinx_rtd_theme
  53. HAS_RTD = True
  54. except:
  55. HAS_RTD = False
  56. # If extensions (or modules to document with autodoc) are in another directory,
  57. # add these directories to sys.path here. If the directory is relative to the
  58. # documentation root, use os.path.abspath to make it absolute, like shown here.
  59. sys.path.insert(0, os.path.abspath('..'))
  60. sys.path.insert(0, os.path.abspath('.'))
  61. # import ptl
  62. # -- General configuration ------------------------------------------------
  63. # If your documentation needs a minimal Sphinx version, state it here.
  64. needs_sphinx = '1.3'
  65. # Add any Sphinx extension module names here, as strings. They can be
  66. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  67. # ones.
  68. extensions = ['sphinx.ext.autodoc']
  69. autodoc_member_order = 'bysource'
  70. # Add any paths that contain templates here, relative to this directory.
  71. # templates_path = []
  72. # The suffix of source filenames.
  73. source_suffix = '.rst'
  74. # The encoding of source files.
  75. # source_encoding = 'utf-8-sig'
  76. # The master toctree document.
  77. master_doc = 'index'
  78. # General information about the project.
  79. project = u'PbsTestLab'
  80. copyright = u'(C) 1994-2018 Altair Engineering, Inc'
  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. #
  85. # The short X.Y version.
  86. __version__ = 'unknown'
  87. exec(compile(open('../ptl/__init__.py').read(), '../ptl/__init__.py', 'exec'))
  88. version = __version__
  89. # The full version, including alpha/beta/rc tags.
  90. release = '1.0.0'
  91. # The language for content autogenerated by Sphinx. Refer to documentation
  92. # for a list of supported languages.
  93. # language = None
  94. # There are two options for replacing |today|: either, you set today to some
  95. # non-false value, then it is used:
  96. # today = ''
  97. # Else, today_fmt is used as the format for a strftime call.
  98. # today_fmt = '%B %d, %Y'
  99. # List of patterns, relative to source directory, that match files and
  100. # directories to ignore when looking for source files.
  101. exclude_patterns = ['target']
  102. # The reST default role (used for this markup: `text`) to use for all
  103. # documents.
  104. # default_role = None
  105. # If true, '()' will be appended to :func: etc. cross-reference text.
  106. # add_function_parentheses = True
  107. # If true, the current module name will be prepended to all description
  108. # unit titles (such as .. function::).
  109. # add_module_names = True
  110. # If true, sectionauthor and moduleauthor directives will be shown in the
  111. # output. They are ignored by default.
  112. # show_authors = False
  113. # The name of the Pygments (syntax highlighting) style to use.
  114. pygments_style = 'sphinx'
  115. # A list of ignored prefixes for module index sorting.
  116. # modindex_common_prefix = []
  117. # If true, keep warnings as "system message" paragraphs in the built documents.
  118. # keep_warnings = False
  119. # -- Options for HTML output ----------------------------------------------
  120. # The theme to use for HTML and HTML Help pages. See the documentation for
  121. # a list of builtin themes.
  122. if HAS_RTD:
  123. html_theme = 'sphinx_rtd_theme'
  124. html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
  125. else:
  126. html_theme = 'sphinxdoc'
  127. # Theme options are theme-specific and customize the look and feel of a theme
  128. # further. For a list of options available for each theme, see the
  129. # documentation.
  130. # html_theme_options = {}
  131. # Add any paths that contain custom themes here, relative to this directory.
  132. # html_theme_path = []
  133. # The name for this set of Sphinx documents. If None, it defaults to
  134. # "<project> v<release> documentation".
  135. # html_title = None
  136. # A shorter title for the navigation bar. Default is the same as html_title.
  137. # html_short_title = None
  138. # The name of an image file (relative to this directory) to place at the top
  139. # of the sidebar.
  140. # html_logo = None
  141. # The name of an image file (within the static path) to use as favicon of the
  142. # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  143. # pixels large.
  144. # html_favicon = None
  145. # Add any paths that contain custom static files (such as style sheets) here,
  146. # relative to this directory. They are copied after the builtin static files,
  147. # so a file named "default.css" will overwrite the builtin "default.css".
  148. # html_static_path = []
  149. # Add any extra paths that contain custom files (such as robots.txt or
  150. # .htaccess) here, relative to this directory. These files are copied
  151. # directly to the root of the documentation.
  152. # html_extra_path = []
  153. # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  154. # using the given strftime format.
  155. # html_last_updated_fmt = '%b %d, %Y'
  156. # If true, SmartyPants will be used to convert quotes and dashes to
  157. # typographically correct entities.
  158. # html_use_smartypants = True
  159. # Custom sidebar templates, maps document names to template names.
  160. # html_sidebars = {}
  161. # Additional templates that should be rendered to pages, maps page names to
  162. # template names.
  163. # html_additional_pages = {}
  164. # If false, no module index is generated.
  165. # html_domain_indices = True
  166. # If false, no index is generated.
  167. # html_use_index = True
  168. # If true, the index is split into individual pages for each letter.
  169. # html_split_index = False
  170. # If true, links to the reST sources are added to the pages.
  171. html_show_sourcelink = True
  172. # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
  173. html_show_sphinx = False
  174. # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
  175. html_show_copyright = True
  176. # If true, an OpenSearch description file will be output, and all pages will
  177. # contain a <link> tag referring to it. The value of this option must be the
  178. # base URL from which the finished HTML is served.
  179. # html_use_opensearch = ''
  180. # This is the file name suffix for HTML files (e.g. ".xhtml").
  181. # html_file_suffix = None
  182. # Output file base name for HTML help builder.
  183. htmlhelp_basename = 'PbsTestLabdoc'
  184. # -- Options for LaTeX output ---------------------------------------------
  185. latex_elements = {'papersize': 'a4paper', }
  186. # The paper size ('letterpaper' or 'a4paper').
  187. # The font size ('10pt', '11pt' or '12pt').
  188. # 'pointsize': '10pt',
  189. # Additional stuff for the LaTeX preamble.
  190. # 'preamble': '',
  191. # Grouping the document tree into LaTeX files. List of tuples
  192. # (source start file, target name, title,
  193. # author, documentclass [howto, manual, or own class]).
  194. latex_documents = [('index', 'PbsTestLab.tex', u'PbsTestLab Documentation',
  195. u'Copyright (C) 1994-2018 Altair Engineering, Inc',
  196. 'manual'), ]
  197. # The name of an image file (relative to this directory) to place at the top of
  198. # the title page.
  199. # latex_logo = None
  200. # For "manual" documents, if this is true, then toplevel headings are parts,
  201. # not chapters.
  202. # latex_use_parts = False
  203. # If true, show page references after internal links.
  204. # latex_show_pagerefs = False
  205. # If true, show URL addresses after external links.
  206. latex_show_urls = 'True'
  207. # Documents to append as an appendix to all manuals.
  208. # latex_appendices = []
  209. # If false, no module index is generated.
  210. # latex_domain_indices = True
  211. # -- Options for manual page output ---------------------------------------
  212. # One entry per manual page. List of tuples
  213. # (source start file, name, description, authors, manual section).
  214. man_pages = [('index', 'pbstestlab', u'PbsTestLab Documentation',
  215. [u'Copyright (C) 1994-2018 Altair Engineering, Inc'], 1)]
  216. # If true, show URL addresses after external links.
  217. # man_show_urls = False
  218. # -- Options for Texinfo output -------------------------------------------
  219. # Grouping the document tree into Texinfo files. List of tuples
  220. # (source start file, target name, title, author,
  221. # dir menu entry, description, category)
  222. texinfo_documents = [('index', 'PbsTestLab', u'PbsTestLab Documentation',
  223. u'Copyright (C) 1994-2018 Altair Engineering, Inc',
  224. 'PbsTestLab', 'PBS Pro Testing and Benchmarking\
  225. Framework', 'Miscellaneous'), ]
  226. # Documents to append as an appendix to all manuals.
  227. # texinfo_appendices = []
  228. # If false, no module index is generated.
  229. # texinfo_domain_indices = True
  230. # How to display URL addresses: 'footnote', 'no', or 'inline'.
  231. texinfo_show_urls = 'inline'
  232. # If true, do not generate a @detailmenu in the "Top" node's menu.
  233. # texinfo_no_detailmenu = False
  234. # Skip the document for unwanted members iside API documentation
  235. def autodoc_skip_member(app, what, name, obj, skip, options):
  236. exclusions = ('chunks_tag', 'chunk_tag', 'array_tag', 'subjob_tag',
  237. 'pbsobjname_re', 'pbsobjattrval_re', 'dt_tag',
  238. 'hms_tag', 'lim_tag', 'fgc_attr_pat', 'fgc_val_pat',
  239. 'version_tag', 'fs_tag', 'conf_re', 'generic_tag',
  240. 'node_type_tag', 'queue_type_tag', 'job_type_tag',
  241. 'job_exit_tag', 'tm_tag', 'server_run_tag',
  242. 'server_nodeup_tag', 'server_enquejob_tag',
  243. 'server_endjob_tag', 'startcycle_tag', 'endcycle_tag',
  244. 'alarm_tag', 'considering_job_tag', 'sched_job_run_tag',
  245. 'estimated_tag', 'run_failure_tag', 'calendarjob_tag',
  246. 'preempt_failure_tag', 'preempt_tag', 'record_tag',
  247. 'mom_run_tag', 'mom_end_tag', 'mom_enquejob_tag',
  248. 'record_tag', 'S_sub_record_tag', 'E_sub_record_tag',
  249. 'sub_record_tag', 'generic_tag', 'node_type_tag',
  250. 'queue_type_tag', 'job_type_tag', 'job_exit_tag', 'tm_tag',
  251. 'server_run_tag', 'server_nodeup_tag', 'server_enquejob_tag',
  252. 'server_endjob_tag', 'startcycle_tag', 'endcycle_tag',
  253. 'alarm_tag', 'considering_job_tag', 'sched_job_run_tag',
  254. 'estimated_tag', 'run_failure_tag', 'calendarjob_tag',
  255. 'preempt_failure_tag', 'preempt_tag', 'record_tag',
  256. 'mom_run_tag', 'mom_end_tag', 'mom_enquejob_tag',
  257. 'record_tag', 'S_sub_record_tag', 'E_sub_record_tag',
  258. 'sub_record_tag')
  259. exclude = name in exclusions
  260. return skip or exclude
  261. def setup(app):
  262. app.connect('autodoc-skip-member', autodoc_skip_member)
  263. # Default autodoc members for API rst file
  264. autodoc_default_flags = ['members', 'no-undoc-members', 'no-private-members']