From 4a47b889927af031a21af9b841b001f21ba7135f Mon Sep 17 00:00:00 2001 From: Myle Ott Date: Mon, 3 Sep 2018 16:33:36 -0700 Subject: [PATCH] Update documentation --- docs/conf.py | 83 +------------------------------------------ docs/requirements.txt | 2 ++ 2 files changed, 3 insertions(+), 82 deletions(-) create mode 100644 docs/requirements.txt diff --git a/docs/conf.py b/docs/conf.py index 77984c15a..ac733584f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,20 +20,10 @@ import os import sys -import fairseq -import sphinx_rtd_theme - # source code directory, relative to this file, for sphinx-autobuild sys.path.insert(0, os.path.abspath('..')) -import recommonmark -from recommonmark.parser import CommonMarkParser -from recommonmark.transform import AutoStructify -source_parsers = { - '.md': CommonMarkParser -} - -source_suffix = ['.rst', '.md'] +source_suffix = ['.rst'] # -- General configuration ------------------------------------------------ @@ -47,9 +37,7 @@ source_suffix = ['.rst', '.md'] extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', - 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', - 'sphinx.ext.githubpages', 'sphinx.ext.napoleon', 'sphinxarg.ext', ] @@ -102,7 +90,6 @@ todo_include_todos = False # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # 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 @@ -143,71 +130,3 @@ intersphinx_mapping = { 'python': ('https://docs.python.org/', None), 'torch': ('https://pytorch.org/docs/master/', None), } - - -# -- Options for HTMLHelp output ------------------------------------------ - -# Output file base name for HTML help builder. -htmlhelp_basename = 'fairseqdoc' - - -# -- 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': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'fairseq.tex', 'fairseq Documentation', - 'Facebook AI Research (FAIR)', 'manual'), -] - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'fairseq', 'fairseq Documentation', - [author], 1) -] - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'fairseq', 'fairseq Documentation', - author, 'fairseq', 'One line description of project.', - 'Miscellaneous'), -] - - -# app setup hook -def setup(app): - app.add_config_value('recommonmark_config', { - 'url_resolver': lambda url: github_doc_root + url, - 'auto_toc_tree_section': 'Contents', - 'enable_eval_rst': True, - 'enable_auto_doc_ref': True, - }, True) - app.add_transform(AutoStructify) diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..c734a1f04 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx<2.0 +sphinx-argparse