Team Ai
Apppublic

OpenMotionLab/MotionGPT

sourceHugging Facemitupdated 1y agoView on Hugging Face
118likes
conf.py353 linesDownload Raw Back to source
1# -*- coding: utf-8 -*-2#3# core documentation build configuration file, created by4# sphinx-quickstart on Sun Oct 16 14:33:48 2016.5#6# This file is execfile()d with the current directory set to its7# containing dir.8#9# Note that not all possible configuration values are present in this10# autogenerated file.11#12# All configuration values have a default; values that are commented out13# serve to show the default.14 15import sys16import os17from pyrender import __version__18from sphinx.domains.python import PythonDomain19 20# If extensions (or modules to document with autodoc) are in another directory,21# add these directories to sys.path here. If the directory is relative to the22# documentation root, use os.path.abspath to make it absolute, like shown here.23sys.path.insert(0, os.path.abspath('../../'))24 25# -- General configuration ------------------------------------------------26 27# If your documentation needs a minimal Sphinx version, state it here.28#needs_sphinx = '1.0'29 30# Add any Sphinx extension module names here, as strings. They can be31# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom32# ones.33extensions = [34    'sphinx.ext.autodoc',35    'sphinx.ext.autosummary',36    'sphinx.ext.coverage',37    'sphinx.ext.githubpages',38    'sphinx.ext.intersphinx',39    'sphinx.ext.napoleon',40    'sphinx.ext.viewcode',41    'sphinx_automodapi.automodapi',42    'sphinx_automodapi.smart_resolver'43]44numpydoc_class_members_toctree = False45automodapi_toctreedirnm = 'generated'46automodsumm_inherited_members = True47 48# Add any paths that contain templates here, relative to this directory.49templates_path = ['_templates']50 51# The suffix(es) of source filenames.52# You can specify multiple suffix as a list of string:53# source_suffix = ['.rst', '.md']54source_suffix = '.rst'55 56# The encoding of source files.57#source_encoding = 'utf-8-sig'58 59# The master toctree document.60master_doc = 'index'61 62# General information about the project.63project = u'pyrender'64copyright = u'2018, Matthew Matl'65author = u'Matthew Matl'66 67# The version info for the project you're documenting, acts as replacement for68# |version| and |release|, also used in various other places throughout the69# built documents.70#71# The short X.Y version.72version = __version__73# The full version, including alpha/beta/rc tags.74release = __version__75 76# The language for content autogenerated by Sphinx. Refer to documentation77# for a list of supported languages.78#79# This is also used if you do content translation via gettext catalogs.80# Usually you set "language" from the command line for these cases.81language = None82 83# There are two options for replacing |today|: either, you set today to some84# non-false value, then it is used:85#today = ''86# Else, today_fmt is used as the format for a strftime call.87#today_fmt = '%B %d, %Y'88 89# List of patterns, relative to source directory, that match files and90# directories to ignore when looking for source files.91exclude_patterns = []92 93# The reST default role (used for this markup: `text`) to use for all94# documents.95#default_role = None96 97# If true, '()' will be appended to :func: etc. cross-reference text.98#add_function_parentheses = True99 100# If true, the current module name will be prepended to all description101# unit titles (such as .. function::).102#add_module_names = True103 104# If true, sectionauthor and moduleauthor directives will be shown in the105# output. They are ignored by default.106#show_authors = False107 108# The name of the Pygments (syntax highlighting) style to use.109pygments_style = 'sphinx'110 111# A list of ignored prefixes for module index sorting.112#modindex_common_prefix = []113 114# If true, keep warnings as "system message" paragraphs in the built documents.115#keep_warnings = False116 117# If true, `todo` and `todoList` produce output, else they produce nothing.118todo_include_todos = False119 120 121# -- Options for HTML output ----------------------------------------------122 123# The theme to use for HTML and HTML Help pages.  See the documentation for124# a list of builtin themes.125import sphinx_rtd_theme126html_theme = 'sphinx_rtd_theme'127html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]128 129# Theme options are theme-specific and customize the look and feel of a theme130# further.  For a list of options available for each theme, see the131# documentation.132#html_theme_options = {}133 134# Add any paths that contain custom themes here, relative to this directory.135#html_theme_path = []136 137# The name for this set of Sphinx documents.  If None, it defaults to138# "<project> v<release> documentation".139#html_title = None140 141# A shorter title for the navigation bar.  Default is the same as html_title.142#html_short_title = None143 144# The name of an image file (relative to this directory) to place at the top145# of the sidebar.146#html_logo = None147 148# The name of an image file (relative to this directory) to use as a favicon of149# the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32150# pixels large.151#html_favicon = None152 153# Add any paths that contain custom static files (such as style sheets) here,154# relative to this directory. They are copied after the builtin static files,155# so a file named "default.css" will overwrite the builtin "default.css".156html_static_path = ['_static']157 158# Add any extra paths that contain custom files (such as robots.txt or159# .htaccess) here, relative to this directory. These files are copied160# directly to the root of the documentation.161#html_extra_path = []162 163# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,164# using the given strftime format.165#html_last_updated_fmt = '%b %d, %Y'166 167# If true, SmartyPants will be used to convert quotes and dashes to168# typographically correct entities.169#html_use_smartypants = True170 171# Custom sidebar templates, maps document names to template names.172#html_sidebars = {}173 174# Additional templates that should be rendered to pages, maps page names to175# template names.176#html_additional_pages = {}177 178# If false, no module index is generated.179#html_domain_indices = True180 181# If false, no index is generated.182#html_use_index = True183 184# If true, the index is split into individual pages for each letter.185#html_split_index = False186 187# If true, links to the reST sources are added to the pages.188#html_show_sourcelink = True189 190# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.191#html_show_sphinx = True192 193# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.194#html_show_copyright = True195 196# If true, an OpenSearch description file will be output, and all pages will197# contain a <link> tag referring to it.  The value of this option must be the198# base URL from which the finished HTML is served.199#html_use_opensearch = ''200 201# This is the file name suffix for HTML files (e.g. ".xhtml").202#html_file_suffix = None203 204# Language to be used for generating the HTML full-text search index.205# Sphinx supports the following languages:206#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'207#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'208#html_search_language = 'en'209 210# A dictionary with options for the search language support, empty by default.211# Now only 'ja' uses this config value212#html_search_options = {'type': 'default'}213 214# The name of a javascript file (relative to the configuration directory) that215# implements a search results scorer. If empty, the default will be used.216#html_search_scorer = 'scorer.js'217 218# Output file base name for HTML help builder.219htmlhelp_basename = 'coredoc'220 221# -- Options for LaTeX output ---------------------------------------------222 223latex_elements = {224# The paper size ('letterpaper' or 'a4paper').225#'papersize': 'letterpaper',226 227# The font size ('10pt', '11pt' or '12pt').228#'pointsize': '10pt',229 230# Additional stuff for the LaTeX preamble.231#'preamble': '',232 233# Latex figure (float) alignment234#'figure_align': 'htbp',235}236 237# Grouping the document tree into LaTeX files. List of tuples238# (source start file, target name, title,239#  author, documentclass [howto, manual, or own class]).240latex_documents = [241    (master_doc, 'pyrender.tex', u'pyrender Documentation',242     u'Matthew Matl', 'manual'),243]244 245# The name of an image file (relative to this directory) to place at the top of246# the title page.247#latex_logo = None248 249# For "manual" documents, if this is true, then toplevel headings are parts,250# not chapters.251#latex_use_parts = False252 253# If true, show page references after internal links.254#latex_show_pagerefs = False255 256# If true, show URL addresses after external links.257#latex_show_urls = False258 259# Documents to append as an appendix to all manuals.260#latex_appendices = []261 262# If false, no module index is generated.263#latex_domain_indices = True264 265 266# -- Options for manual page output ---------------------------------------267 268# One entry per manual page. List of tuples269# (source start file, name, description, authors, manual section).270man_pages = [271    (master_doc, 'pyrender', u'pyrender Documentation',272     [author], 1)273]274 275# If true, show URL addresses after external links.276#man_show_urls = False277 278 279# -- Options for Texinfo output -------------------------------------------280 281# Grouping the document tree into Texinfo files. List of tuples282# (source start file, target name, title, author,283#  dir menu entry, description, category)284texinfo_documents = [285    (master_doc, 'pyrender', u'pyrender Documentation',286     author, 'pyrender', 'One line description of project.',287     'Miscellaneous'),288]289 290# Documents to append as an appendix to all manuals.291#texinfo_appendices = []292 293# If false, no module index is generated.294#texinfo_domain_indices = True295 296# How to display URL addresses: 'footnote', 'no', or 'inline'.297#texinfo_show_urls = 'footnote'298 299# If true, do not generate a @detailmenu in the "Top" node's menu.300#texinfo_no_detailmenu = False301 302intersphinx_mapping = {303    'python' : ('https://docs.python.org/', None),304    'pyrender' : ('https://pyrender.readthedocs.io/en/latest/', None),305}306 307# Autosummary fix308autosummary_generate = True309 310# Try to suppress multiple-definition warnings by always taking the shorter311# path when two or more paths have the same base module312 313class MyPythonDomain(PythonDomain):314 315    def find_obj(self, env, modname, classname, name, type, searchmode=0):316        """Ensures an object always resolves to the desired module317        if defined there."""318        orig_matches = PythonDomain.find_obj(319            self, env, modname, classname, name, type, searchmode320        )321 322        if len(orig_matches) <= 1:323            return orig_matches324 325        # If multiple matches, try to take the shortest if all the modules are326        # the same327        first_match_name_sp = orig_matches[0][0].split('.')328        base_name = first_match_name_sp[0]329        min_len = len(first_match_name_sp)330        best_match = orig_matches[0]331 332        for match in orig_matches[1:]:333            match_name = match[0]334            match_name_sp = match_name.split('.')335            match_base = match_name_sp[0]336 337            # If we have mismatched bases, return them all to trigger warnings338            if match_base != base_name:339                return orig_matches340 341            # Otherwise, check and see if it's shorter342            if len(match_name_sp) < min_len:343                min_len = len(match_name_sp)344                best_match = match345 346        return (best_match,)347 348 349def setup(sphinx):350    """Use MyPythonDomain in place of PythonDomain"""351    sphinx.override_domain(MyPythonDomain)352 353