conf.py 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. # fairseq documentation build configuration file, created by
  5. # sphinx-quickstart on Fri Aug 17 21:45:30 2018.
  6. #
  7. # This file is execfile()d with the current directory set to its
  8. # containing dir.
  9. #
  10. # Note that not all possible configuration values are present in this
  11. # autogenerated file.
  12. #
  13. # All configuration values have a default; values that are commented out
  14. # serve to show the default.
  15. # If extensions (or modules to document with autodoc) are in another directory,
  16. # add these directories to sys.path here. If the directory is relative to the
  17. # documentation root, use os.path.abspath to make it absolute, like shown here.
  18. import os
  19. import sys
  20. from fairseq import __version__
  21. # source code directory, relative to this file, for sphinx-autobuild
  22. sys.path.insert(0, os.path.abspath(".."))
  23. source_suffix = [".rst"]
  24. # -- General configuration ------------------------------------------------
  25. # If your documentation needs a minimal Sphinx version, state it here.
  26. #
  27. # needs_sphinx = '1.0'
  28. # Add any Sphinx extension module names here, as strings. They can be
  29. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  30. # ones.
  31. extensions = [
  32. "sphinx.ext.autodoc",
  33. "sphinx.ext.intersphinx",
  34. "sphinx.ext.viewcode",
  35. "sphinx.ext.napoleon",
  36. "sphinxarg.ext",
  37. ]
  38. # Add any paths that contain templates here, relative to this directory.
  39. templates_path = ["_templates"]
  40. # The master toctree document.
  41. master_doc = "index"
  42. # General information about the project.
  43. project = "fairseq"
  44. copyright = "Facebook AI Research (FAIR)"
  45. author = "Facebook AI Research (FAIR)"
  46. github_doc_root = "https://github.com/pytorch/fairseq/tree/main/docs/"
  47. # The version info for the project you're documenting, acts as replacement for
  48. # |version| and |release|, also used in various other places throughout the
  49. # built documents.
  50. #
  51. # The short X.Y version.
  52. version = __version__
  53. # The full version, including alpha/beta/rc tags.
  54. release = __version__
  55. # The language for content autogenerated by Sphinx. Refer to documentation
  56. # for a list of supported languages.
  57. #
  58. # This is also used if you do content translation via gettext catalogs.
  59. # Usually you set "language" from the command line for these cases.
  60. language = None
  61. # List of patterns, relative to source directory, that match files and
  62. # directories to ignore when looking for source files.
  63. # This patterns also effect to html_static_path and html_extra_path
  64. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
  65. # The name of the Pygments (syntax highlighting) style to use.
  66. pygments_style = "sphinx"
  67. highlight_language = "python"
  68. # If true, `todo` and `todoList` produce output, else they produce nothing.
  69. todo_include_todos = False
  70. # -- Options for HTML output ----------------------------------------------
  71. html_theme = "classic"
  72. # Example configuration for intersphinx: refer to the Python standard library.
  73. intersphinx_mapping = {
  74. "numpy": ("http://docs.scipy.org/doc/numpy/", None),
  75. "python": ("https://docs.python.org/", None),
  76. "torch": ("https://pytorch.org/docs/master/", None),
  77. }