prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Version selector on gh-pages like in pytorch docs
  I think that many of us are installing the ignite using the master branch.
  
  It would be nice if the ignite documentation also contains the master docs like https://pytorch.org/docs/versions.html. 
  
  
  What do you think?
  
  Best,
  Igor.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `docs/source/conf.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 #
  3 # Configuration file for the Sphinx documentation builder.
  4 #
  5 # This file does only contain a selection of the most common options. For a
  6 # full list see the documentation:
  7 # http://www.sphinx-doc.org/en/stable/config
  8 
  9 # -- Path setup --------------------------------------------------------------
  10 
  11 # If extensions (or modules to document with autodoc) are in another directory,
  12 # add these directories to sys.path here. If the directory is relative to the
  13 # documentation root, use os.path.abspath to make it absolute, like shown here.
  14 #
  15 # import os
  16 # import sys
  17 # sys.path.insert(0, os.path.abspath('.'))
  18 import ignite
  19 import sphinx_rtd_theme
  20 
  21 # -- Project information -----------------------------------------------------
  22 
  23 project = 'ignite'
  24 copyright = '2018, Torch Contributors'
  25 author = 'Torch Contributors'
  26 
  27 # The short X.Y version
  28 version = 'master (' + ignite.__version__ + ' )'
  29 # The full version, including alpha/beta/rc tags
  30 release = 'master'
  31 
  32 
  33 # -- General configuration ---------------------------------------------------
  34 
  35 # If your documentation needs a minimal Sphinx version, state it here.
  36 #
  37 # needs_sphinx = '1.0'
  38 
  39 # Add any Sphinx extension module names here, as strings. They can be
  40 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  41 # ones.
  42 extensions = [
  43     'sphinx.ext.autosummary',
  44     'sphinx.ext.doctest',
  45     'sphinx.ext.intersphinx',
  46     'sphinx.ext.todo',
  47     'sphinx.ext.coverage',
  48     'sphinx.ext.mathjax',
  49     'sphinx.ext.napoleon',
  50     'sphinx.ext.viewcode'
  51 ]
  52 
  53 # Add any paths that contain templates here, relative to this directory.
  54 templates_path = ['_templates']
  55 
  56 # The suffix(es) of source filenames.
  57 # You can specify multiple suffix as a list of string:
  58 #
  59 # source_suffix = ['.rst', '.md']
  60 source_suffix = '.rst'
  61 
  62 # The master toctree document.
  63 master_doc = 'index'
  64 
  65 # The language for content autogenerated by Sphinx. Refer to documentation
  66 # for a list of supported languages.
  67 #
  68 # This is also used if you do content translation via gettext catalogs.
  69 # Usually you set "language" from the command line for these cases.
  70 language = None
  71 
  72 # List of patterns, relative to source directory, that match files and
  73 # directories to ignore when looking for source files.
  74 # This pattern also affects html_static_path and html_extra_path .
  75 exclude_patterns = []
  76 
  77 # The name of the Pygments (syntax highlighting) style to use.
  78 pygments_style = 'sphinx'
  79 
  80 
  81 # -- Options for HTML output -------------------------------------------------
  82 
  83 # The theme to use for HTML and HTML Help pages.  See the documentation for
  84 # a list of builtin themes.
  85 #
  86 html_theme = 'sphinx_rtd_theme'
  87 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
  88 
  89 html_theme_options = {
  90     'collapse_navigation': False,
  91     'display_version': True,
  92     'logo_only': True,
  93 }
  94 
  95 html_logo = '_static/img/ignite-logo-dark.svg'
  96 
  97 # Theme options are theme-specific and customize the look and feel of a theme
  98 # further.  For a list of options available for each theme, see the
  99 # documentation.
  100 #
  101 # html_theme_options = {}
  102 
  103 # Add any paths that contain custom static files (such as style sheets) here,
  104 # relative to this directory. They are copied after the builtin static files,
  105 # so a file named "default.css" will overwrite the builtin "default.css".
  106 html_static_path = ['_static']
  107 
  108 html_context = {
  109     'css_files': [
  110         'https://fonts.googleapis.com/css?family=Lato',
  111         '_static/css/pytorch_theme.css'
  112     ],
  113 }
  114 
  115 
  116 # -- Options for HTMLHelp output ---------------------------------------------
  117 
  118 # Output file base name for HTML help builder.
  119 htmlhelp_basename = 'ignitedoc'
  120 
  121 
  122 # -- Options for LaTeX output ------------------------------------------------
  123 
  124 latex_elements = {
  125     # The paper size ('letterpaper' or 'a4paper').
  126     #
  127     # 'papersize': 'letterpaper',
  128 
  129     # The font size ('10pt', '11pt' or '12pt').
  130     #
  131     # 'pointsize': '10pt',
  132 
  133     # Additional stuff for the LaTeX preamble.
  134     #
  135     # 'preamble': '',
  136 
  137     # Latex figure (float) alignment
  138     #
  139     # 'figure_align': 'htbp',
  140 }
  141 
  142 # Grouping the document tree into LaTeX files. List of tuples
  143 # (source start file, target name, title,
  144 #  author, documentclass [howto, manual, or own class]).
  145 latex_documents = [
  146     (master_doc, 'ignite.tex', 'ignite Documentation',
  147      'Torch Contributors', 'manual'),
  148 ]
  149 
  150 
  151 # -- Options for manual page output ------------------------------------------
  152 
  153 # One entry per manual page. List of tuples
  154 # (source start file, name, description, authors, manual section).
  155 man_pages = [
  156     (master_doc, 'ignite', 'ignite Documentation',
  157      [author], 1)
  158 ]
  159 
  160 
  161 # -- Options for Texinfo output ----------------------------------------------
  162 
  163 # Grouping the document tree into Texinfo files. List of tuples
  164 # (source start file, target name, title, author,
  165 #  dir menu entry, description, category)
  166 texinfo_documents = [
  167     (master_doc, 'ignite', 'ignite Documentation',
  168      author, 'ignite', 'One line description of project.',
  169      'Miscellaneous'),
  170 ]
  171 
  172 
  173 # -- Extension configuration -------------------------------------------------
  174 
  175 # -- Options for intersphinx extension ---------------------------------------
  176 
  177 # Example configuration for intersphinx: refer to the Python standard library.
  178 intersphinx_mapping = {'https://docs.python.org/': None}
  179 
  180 # -- Options for todo extension ----------------------------------------------
  181 
  182 # If true, `todo` and `todoList` produce output, else they produce nothing.
  183 todo_include_todos = True
  184
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/docs/source/conf.py b/docs/source/conf.py
  --- a/docs/source/conf.py
  +++ b/docs/source/conf.py
  @@ -12,9 +12,9 @@
   # 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.
   #
  -# import os
  -# import sys
  -# sys.path.insert(0, os.path.abspath('.'))
  +import os
  +import sys
  +sys.path.insert(0, os.path.abspath('../..'))
   import ignite
   import sphinx_rtd_theme
   
  @@ -25,7 +25,15 @@
   author = 'Torch Contributors'
   
   # The short X.Y version
  -version = 'master (' + ignite.__version__ + ' )'
  +try:
  +    version = os.environ['code_version']
  +    if 'master' in version:
  +        version = 'master (' + ignite.__version__ + ')'
  +    else:
  +        version = version.replace('v', '')
  +except KeyError:
  +    version = ignite.__version__
  +
   # The full version, including alpha/beta/rc tags
   release = 'master'
  
verification_info: {"golden_diff": "diff --git a/docs/source/conf.py b/docs/source/conf.py\n--- a/docs/source/conf.py\n+++ b/docs/source/conf.py\n@@ -12,9 +12,9 @@\n # add these directories to sys.path here. If the directory is relative to the\n # documentation root, use os.path.abspath to make it absolute, like shown here.\n #\n-# import os\n-# import sys\n-# sys.path.insert(0, os.path.abspath('.'))\n+import os\n+import sys\n+sys.path.insert(0, os.path.abspath('../..'))\n import ignite\n import sphinx_rtd_theme\n \n@@ -25,7 +25,15 @@\n author = 'Torch Contributors'\n \n # The short X.Y version\n-version = 'master (' + ignite.__version__ + ' )'\n+try:\n+    version = os.environ['code_version']\n+    if 'master' in version:\n+        version = 'master (' + ignite.__version__ + ')'\n+    else:\n+        version = version.replace('v', '')\n+except KeyError:\n+    version = ignite.__version__\n+\n # The full version, including alpha/beta/rc tags\n release = 'master'\n", "issue": "Version selector on gh-pages like in pytorch docs\nI think that many of us are installing the ignite using the master branch.\r\n\r\nIt would be nice if the ignite documentation also contains the master docs like https://pytorch.org/docs/versions.html. \r\n\r\n\r\nWhat do you think?\r\n\r\nBest,\r\nIgor.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\n# import os\n# import sys\n# sys.path.insert(0, os.path.abspath('.'))\nimport ignite\nimport sphinx_rtd_theme\n\n# -- Project information -----------------------------------------------------\n\nproject = 'ignite'\ncopyright = '2018, Torch Contributors'\nauthor = 'Torch Contributors'\n\n# The short X.Y version\nversion = 'master (' + ignite.__version__ + ' )'\n# The full version, including alpha/beta/rc tags\nrelease = 'master'\n\n\n# -- General configuration ---------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    'sphinx.ext.autosummary',\n    'sphinx.ext.doctest',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.todo',\n    'sphinx.ext.coverage',\n    'sphinx.ext.mathjax',\n    'sphinx.ext.napoleon',\n    'sphinx.ext.viewcode'\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\n# source_suffix = ['.rst', '.md']\nsource_suffix = '.rst'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path .\nexclude_patterns = []\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'sphinx_rtd_theme'\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n\nhtml_theme_options = {\n    'collapse_navigation': False,\n    'display_version': True,\n    'logo_only': True,\n}\n\nhtml_logo = '_static/img/ignite-logo-dark.svg'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\n# html_theme_options = {}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\nhtml_context = {\n    'css_files': [\n        'https://fonts.googleapis.com/css?family=Lato',\n        '_static/css/pytorch_theme.css'\n    ],\n}\n\n\n# -- Options for HTMLHelp output ---------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'ignitedoc'\n\n\n# -- Options for LaTeX output ------------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (master_doc, 'ignite.tex', 'ignite Documentation',\n     'Torch Contributors', 'manual'),\n]\n\n\n# -- Options for manual page output ------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    (master_doc, 'ignite', 'ignite Documentation',\n     [author], 1)\n]\n\n\n# -- Options for Texinfo output ----------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (master_doc, 'ignite', 'ignite Documentation',\n     author, 'ignite', 'One line description of project.',\n     'Miscellaneous'),\n]\n\n\n# -- Extension configuration -------------------------------------------------\n\n# -- Options for intersphinx extension ---------------------------------------\n\n# Example configuration for intersphinx: refer to the Python standard library.\nintersphinx_mapping = {'https://docs.python.org/': None}\n\n# -- Options for todo extension ----------------------------------------------\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = True\n", "path": "docs/source/conf.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport os\nimport sys\nsys.path.insert(0, os.path.abspath('../..'))\nimport ignite\nimport sphinx_rtd_theme\n\n# -- Project information -----------------------------------------------------\n\nproject = 'ignite'\ncopyright = '2018, Torch Contributors'\nauthor = 'Torch Contributors'\n\n# The short X.Y version\ntry:\n    version = os.environ['code_version']\n    if 'master' in version:\n        version = 'master (' + ignite.__version__ + ')'\n    else:\n        version = version.replace('v', '')\nexcept KeyError:\n    version = ignite.__version__\n\n# The full version, including alpha/beta/rc tags\nrelease = 'master'\n\n\n# -- General configuration ---------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    'sphinx.ext.autosummary',\n    'sphinx.ext.doctest',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.todo',\n    'sphinx.ext.coverage',\n    'sphinx.ext.mathjax',\n    'sphinx.ext.napoleon',\n    'sphinx.ext.viewcode'\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\n# source_suffix = ['.rst', '.md']\nsource_suffix = '.rst'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path .\nexclude_patterns = []\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'sphinx_rtd_theme'\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n\nhtml_theme_options = {\n    'collapse_navigation': False,\n    'display_version': True,\n    'logo_only': True,\n}\n\nhtml_logo = '_static/img/ignite-logo-dark.svg'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\n# html_theme_options = {}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\nhtml_context = {\n    'css_files': [\n        'https://fonts.googleapis.com/css?family=Lato',\n        '_static/css/pytorch_theme.css'\n    ],\n}\n\n\n# -- Options for HTMLHelp output ---------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'ignitedoc'\n\n\n# -- Options for LaTeX output ------------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (master_doc, 'ignite.tex', 'ignite Documentation',\n     'Torch Contributors', 'manual'),\n]\n\n\n# -- Options for manual page output ------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    (master_doc, 'ignite', 'ignite Documentation',\n     [author], 1)\n]\n\n\n# -- Options for Texinfo output ----------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (master_doc, 'ignite', 'ignite Documentation',\n     author, 'ignite', 'One line description of project.',\n     'Miscellaneous'),\n]\n\n\n# -- Extension configuration -------------------------------------------------\n\n# -- Options for intersphinx extension ---------------------------------------\n\n# Example configuration for intersphinx: refer to the Python standard library.\nintersphinx_mapping = {'https://docs.python.org/': None}\n\n# -- Options for todo extension ----------------------------------------------\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = True\n", "path": "docs/source/conf.py"}]}