From 7f4c9ae2cedbb015b413293b7649f5dc224379b6 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <yamanu@xilinx.com> Date: Tue, 1 Oct 2019 12:53:44 +0100 Subject: [PATCH] move autogen docs temporarily to subfolder --- docs/{ => finn}/Makefile | 0 docs/{ => finn}/_static/.gitignore | 0 docs/{ => finn}/authors.rst | 0 docs/{ => finn}/changelog.rst | 0 docs/{ => finn}/conf.py | 91 +++++++++++++++--------------- docs/{ => finn}/index.rst | 0 docs/{ => finn}/license.rst | 0 7 files changed, 47 insertions(+), 44 deletions(-) rename docs/{ => finn}/Makefile (100%) rename docs/{ => finn}/_static/.gitignore (100%) rename docs/{ => finn}/authors.rst (100%) rename docs/{ => finn}/changelog.rst (100%) rename docs/{ => finn}/conf.py (80%) rename docs/{ => finn}/index.rst (100%) rename docs/{ => finn}/license.rst (100%) diff --git a/docs/Makefile b/docs/finn/Makefile similarity index 100% rename from docs/Makefile rename to docs/finn/Makefile diff --git a/docs/_static/.gitignore b/docs/finn/_static/.gitignore similarity index 100% rename from docs/_static/.gitignore rename to docs/finn/_static/.gitignore diff --git a/docs/authors.rst b/docs/finn/authors.rst similarity index 100% rename from docs/authors.rst rename to docs/finn/authors.rst diff --git a/docs/changelog.rst b/docs/finn/changelog.rst similarity index 100% rename from docs/changelog.rst rename to docs/finn/changelog.rst diff --git a/docs/conf.py b/docs/finn/conf.py similarity index 80% rename from docs/conf.py rename to docs/finn/conf.py index aeb4a0487..ba93a027c 100644 --- a/docs/conf.py +++ b/docs/finn/conf.py @@ -8,18 +8,19 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import os -import sys import inspect +import os import shutil +import sys -__location__ = os.path.join(os.getcwd(), os.path.dirname( - inspect.getfile(inspect.currentframe()))) +__location__ = os.path.join( + os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe())) +) # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.join(__location__, '../src')) +sys.path.insert(0, os.path.join(__location__, "../src")) # -- Run sphinx-apidoc ------------------------------------------------------ # This hack is necessary since RTD does not issue `sphinx-apidoc` before running @@ -49,7 +50,7 @@ try: cmd_line = cmd_line_template.format(outputdir=output_dir, moduledir=module_dir) args = cmd_line.split(" ") - if parse_version(sphinx.__version__) >= parse_version('1.7'): + if parse_version(sphinx.__version__) >= parse_version("1.7"): args = args[1:] apidoc.main(args) @@ -63,35 +64,43 @@ except Exception as e: # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', - 'sphinx.ext.autosummary', 'sphinx.ext.viewcode', 'sphinx.ext.coverage', - 'sphinx.ext.doctest', 'sphinx.ext.ifconfig', 'sphinx.ext.mathjax', - 'sphinx.ext.napoleon'] +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.intersphinx", + "sphinx.ext.todo", + "sphinx.ext.autosummary", + "sphinx.ext.viewcode", + "sphinx.ext.coverage", + "sphinx.ext.doctest", + "sphinx.ext.ifconfig", + "sphinx.ext.mathjax", + "sphinx.ext.napoleon", +] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # The suffix of source filenames. -source_suffix = '.rst' +source_suffix = ".rst" # The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = u'FINN' -copyright = u'2019, Yaman Umuroglu' +project = u"FINN" +copyright = u"2019, Yaman Umuroglu" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '' # Is set by calling `setup.py docs` +version = "" # Is set by calling `setup.py docs` # The full version, including alpha/beta/rc tags. -release = '' # Is set by calling `setup.py docs` +release = "" # Is set by calling `setup.py docs` # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -105,7 +114,7 @@ release = '' # Is set by calling `setup.py docs` # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ['_build'] +exclude_patterns = ["_build"] # The reST default role (used for this markup: `text`) to use for all documents. # default_role = None @@ -122,7 +131,7 @@ exclude_patterns = ['_build'] # show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] @@ -135,15 +144,12 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'alabaster' +html_theme = "alabaster" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_theme_options = { - 'sidebar_width': '300px', - 'page_width': '1200px' -} +html_theme_options = {"sidebar_width": "300px", "page_width": "1200px"} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] @@ -172,7 +178,7 @@ else: # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ["_static"] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. @@ -216,27 +222,24 @@ html_static_path = ['_static'] # html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'finn-doc' +htmlhelp_basename = "finn-doc" # -- Options for LaTeX output -------------------------------------------------- latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -# 'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -# 'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -# 'preamble': '', + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + # Additional stuff for the LaTeX preamble. + # 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'user_guide.tex', u'FINN Documentation', - u'Yaman Umuroglu', 'manual'), + ("index", "user_guide.tex", u"FINN Documentation", u"Yaman Umuroglu", "manual") ] # The name of an image file (relative to this directory) to place at the top of @@ -260,13 +263,13 @@ latex_documents = [ # latex_domain_indices = True # -- External mapping ------------------------------------------------------------ -python_version = '.'.join(map(str, sys.version_info[0:2])) +python_version = ".".join(map(str, sys.version_info[0:2])) intersphinx_mapping = { - 'sphinx': ('http://www.sphinx-doc.org/en/stable', None), - 'python': ('https://docs.python.org/' + python_version, None), - 'matplotlib': ('https://matplotlib.org', None), - 'numpy': ('https://docs.scipy.org/doc/numpy', None), - 'sklearn': ('http://scikit-learn.org/stable', None), - 'pandas': ('http://pandas.pydata.org/pandas-docs/stable', None), - 'scipy': ('https://docs.scipy.org/doc/scipy/reference', None), + "sphinx": ("http://www.sphinx-doc.org/en/stable", None), + "python": ("https://docs.python.org/" + python_version, None), + "matplotlib": ("https://matplotlib.org", None), + "numpy": ("https://docs.scipy.org/doc/numpy", None), + "sklearn": ("http://scikit-learn.org/stable", None), + "pandas": ("http://pandas.pydata.org/pandas-docs/stable", None), + "scipy": ("https://docs.scipy.org/doc/scipy/reference", None), } diff --git a/docs/index.rst b/docs/finn/index.rst similarity index 100% rename from docs/index.rst rename to docs/finn/index.rst diff --git a/docs/license.rst b/docs/finn/license.rst similarity index 100% rename from docs/license.rst rename to docs/finn/license.rst -- GitLab