We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Keeping the docs current
We're currently manually pushing the docs to https://bids-standard.github.io/pybids/, which is easy to forget, and the docs are currently out-of-date (0.9). It would be good to make an explicit process to update them or set up something automatic like ReadTheDocs.

ReadTheDocs also has the advantage of keeping old versions around, which might be useful for reference as the API changes.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `doc/conf.py`
Content:
```
1 # Configuration file for the Sphinx documentation builder.
2 #
3 # This file only contains a selection of the most common options. For a full
4 # list see the documentation:
5 # https://www.sphinx-doc.org/en/master/usage/configuration.html
6 
7 # -- Path setup --------------------------------------------------------------
8 
9 # If extensions (or modules to document with autodoc) are in another directory,
10 # add these directories to sys.path here. If the directory is relative to the
11 # documentation root, use os.path.abspath to make it absolute, like shown here.
12 #
13 import os
14 import sys
15 import sphinx_rtd_theme
16 
17 sys.path.insert(0, os.path.abspath('../'))
18 
19 # -- Project information -----------------------------------------------------
20 
21 project = 'PyBIDS'
22 copyright = '2020, Developers of PyBIDS'
23 author = 'Developers of PyBIDS'
24 
25 currentdir = os.path.abspath(os.path.dirname(__file__))
26 from bids._version import get_versions
27 __version__ = get_versions()['version']
28 source_version = __version__
29 currentdir = os.path.abspath(os.path.dirname(__file__))
30 
31 # -- General configuration ---------------------------------------------------
32 
33 # Add any Sphinx extension module names here, as strings. They can be
34 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
35 # ones.
36 extensions = [
37     'sphinx.ext.autodoc',
38     'sphinx.ext.autosummary',
39     'sphinx.ext.autosectionlabel',
40     'sphinx.ext.intersphinx',
41     'sphinx.ext.coverage',
42     'sphinx.ext.mathjax',
43     'sphinx.ext.viewcode',
44     'sphinx.ext.githubpages',
45     'sphinx.ext.napoleon',
46     'numpydoc',
47     'm2r'
48 ]
49 
50 intersphinx_mapping = {
51     'http://docs.python.org/3.5': None,
52     'http://docs.scipy.org/doc/numpy': None,
53     'http://docs.scipy.org/doc/scipy/reference': None,
54     'http://matplotlib.org/': None,
55     'http://scikit-learn.org/0.17': None,
56     'http://nipy.org/nibabel/': None,
57     'http://pandas.pydata.org/pandas-docs/stable/': None,
58     'http://neurosynth.readthedocs.io/en/latest/': None,
59 }
60 
61 # If your documentation needs a minimal Sphinx version, state it here.
62 needs_sphinx = '2.2.0'
63 
64 # Generate stubs
65 autosummary_generate = True
66 autodoc_default_flags = ['members', 'inherited-members']
67 add_module_names = False
68 
69 # Add any paths that contain templates here, relative to this directory.
70 templates_path = ['_templates']
71 
72 # The suffix of source filenames.
73 source_suffix = ['.rst', '.md']
74 
75 # The master toctree document.
76 master_doc = 'index'
77 
78 # List of patterns, relative to source directory, that match files and
79 # directories to ignore when looking for source files.
80 # This pattern also affects html_static_path and html_extra_path.
81 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
82 
83 # The short X.Y version.
84 version = ''
85 # The full version, including alpha/beta/rc tags.
86 import bids
87 release = bids.__version__
88 
89 # The name of the Pygments (syntax highlighting) style to use.
90 pygments_style = 'sphinx'
91 
92 # -- Options for HTML output -------------------------------------------------
93 
94 # The theme to use for HTML and HTML Help pages.  See the documentation for
95 # a list of builtin themes.
96 #
97 # The theme to use for HTML and HTML Help pages.  See the documentation for
98 # a list of builtin themes.
99 html_theme = "sphinx_rtd_theme"
100 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
101 
102 # Add any paths that contain custom static files (such as style sheets) here,
103 # relative to this directory. They are copied after the builtin static files,
104 # so a file named "default.css" will overwrite the builtin "default.css".
105 html_static_path = ['_static']
106 
107 # If false, no module index is generated.
108 html_domain_indices = False
109 
110 # One entry per manual page. List of tuples
111 # (source start file, name, description, authors, manual section).
112 man_pages = [
113     ('index', 'bids', 'bids Documentation',
114      [author], 1)
115 ]
116 
117 # Grouping the document tree into Texinfo files. List of tuples
118 # (source start file, target name, title, author,
119 #  dir menu entry, description, category)
120 texinfo_documents = [
121   ('index', 'bids', 'bids Documentation',
122    author, 'bids', 'One line description of project.',
123    'Miscellaneous'),
124 ]
125 
126 # If false, no module index is generated.
127 texinfo_domain_indices = False
128
```
--- 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()

```

diff --git a/doc/conf.py b/doc/conf.py
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -12,20 +12,21 @@
 #
 import os
 import sys
+from datetime import date
+
 import sphinx_rtd_theme
 
+import bids
+
 sys.path.insert(0, os.path.abspath('../'))
 
 # -- Project information -----------------------------------------------------
 
 project = 'PyBIDS'
-copyright = '2020, Developers of PyBIDS'
+copyright = '2015-{}, Developers of PyBIDS'.format(date.today().year)
 author = 'Developers of PyBIDS'
 
 currentdir = os.path.abspath(os.path.dirname(__file__))
-from bids._version import get_versions
-__version__ = get_versions()['version']
-source_version = __version__
 currentdir = os.path.abspath(os.path.dirname(__file__))
 
 # -- General configuration ---------------------------------------------------
@@ -44,20 +45,21 @@
     'sphinx.ext.githubpages',
     'sphinx.ext.napoleon',
     'numpydoc',
-    'm2r'
 ]
 
 intersphinx_mapping = {
-    'http://docs.python.org/3.5': None,
-    'http://docs.scipy.org/doc/numpy': None,
-    'http://docs.scipy.org/doc/scipy/reference': None,
-    'http://matplotlib.org/': None,
-    'http://scikit-learn.org/0.17': None,
-    'http://nipy.org/nibabel/': None,
-    'http://pandas.pydata.org/pandas-docs/stable/': None,
-    'http://neurosynth.readthedocs.io/en/latest/': None,
+    'https://docs.python.org/3.5': None,
+    'https://docs.scipy.org/doc/numpy': None,
+    'https://docs.scipy.org/doc/scipy/reference': None,
+    'https://matplotlib.org/': None,
+    'https://scikit-learn.org/0.17': None,
+    'https://nipy.org/nibabel/': None,
+    'https://pandas.pydata.org/pandas-docs/stable/': None,
+    'https://neurosynth.readthedocs.io/en/latest/': None,
 }
 
+intersphinx_timeout = 5
+
 # If your documentation needs a minimal Sphinx version, state it here.
 needs_sphinx = '2.2.0'
 
@@ -81,10 +83,9 @@
 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
 
 # The short X.Y version.
-version = ''
+version = bids.__version__
 # The full version, including alpha/beta/rc tags.
-import bids
-release = bids.__version__
+release = version
 
 # The name of the Pygments (syntax highlighting) style to use.
 pygments_style = 'sphinx'

{"golden_diff": "diff --git a/doc/conf.py b/doc/conf.py\n--- a/doc/conf.py\n+++ b/doc/conf.py\n@@ -12,20 +12,21 @@\n #\n import os\n import sys\n+from datetime import date\n+\n import sphinx_rtd_theme\n \n+import bids\n+\n sys.path.insert(0, os.path.abspath('../'))\n \n # -- Project information -----------------------------------------------------\n \n project = 'PyBIDS'\n-copyright = '2020, Developers of PyBIDS'\n+copyright = '2015-{}, Developers of PyBIDS'.format(date.today().year)\n author = 'Developers of PyBIDS'\n \n currentdir = os.path.abspath(os.path.dirname(__file__))\n-from bids._version import get_versions\n-__version__ = get_versions()['version']\n-source_version = __version__\n currentdir = os.path.abspath(os.path.dirname(__file__))\n \n # -- General configuration ---------------------------------------------------\n@@ -44,20 +45,21 @@\n     'sphinx.ext.githubpages',\n     'sphinx.ext.napoleon',\n     'numpydoc',\n-    'm2r'\n ]\n \n intersphinx_mapping = {\n-    'http://docs.python.org/3.5': None,\n-    'http://docs.scipy.org/doc/numpy': None,\n-    'http://docs.scipy.org/doc/scipy/reference': None,\n-    'http://matplotlib.org/': None,\n-    'http://scikit-learn.org/0.17': None,\n-    'http://nipy.org/nibabel/': None,\n-    'http://pandas.pydata.org/pandas-docs/stable/': None,\n-    'http://neurosynth.readthedocs.io/en/latest/': None,\n+    'https://docs.python.org/3.5': None,\n+    'https://docs.scipy.org/doc/numpy': None,\n+    'https://docs.scipy.org/doc/scipy/reference': None,\n+    'https://matplotlib.org/': None,\n+    'https://scikit-learn.org/0.17': None,\n+    'https://nipy.org/nibabel/': None,\n+    'https://pandas.pydata.org/pandas-docs/stable/': None,\n+    'https://neurosynth.readthedocs.io/en/latest/': None,\n }\n \n+intersphinx_timeout = 5\n+\n # If your documentation needs a minimal Sphinx version, state it here.\n needs_sphinx = '2.2.0'\n \n@@ -81,10 +83,9 @@\n exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n \n # The short X.Y version.\n-version = ''\n+version = bids.__version__\n # The full version, including alpha/beta/rc tags.\n-import bids\n-release = bids.__version__\n+release = version\n \n # The name of the Pygments (syntax highlighting) style to use.\n pygments_style = 'sphinx'\n", "issue": "Keeping the docs current\nWe're currently manually pushing the docs to https://bids-standard.github.io/pybids/, which is easy to forget, and the docs are currently out-of-date (0.9). It would be good to make an explicit process to update them or set up something automatic like ReadTheDocs.\r\n\r\nReadTheDocs also has the advantage of keeping old versions around, which might be useful for reference as the API changes.\n", "before_files": [{"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\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\nimport sphinx_rtd_theme\n\nsys.path.insert(0, os.path.abspath('../'))\n\n# -- Project information -----------------------------------------------------\n\nproject = 'PyBIDS'\ncopyright = '2020, Developers of PyBIDS'\nauthor = 'Developers of PyBIDS'\n\ncurrentdir = os.path.abspath(os.path.dirname(__file__))\nfrom bids._version import get_versions\n__version__ = get_versions()['version']\nsource_version = __version__\ncurrentdir = os.path.abspath(os.path.dirname(__file__))\n\n# -- General configuration ---------------------------------------------------\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.autodoc',\n    'sphinx.ext.autosummary',\n    'sphinx.ext.autosectionlabel',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.coverage',\n    'sphinx.ext.mathjax',\n    'sphinx.ext.viewcode',\n    'sphinx.ext.githubpages',\n    'sphinx.ext.napoleon',\n    'numpydoc',\n    'm2r'\n]\n\nintersphinx_mapping = {\n    'http://docs.python.org/3.5': None,\n    'http://docs.scipy.org/doc/numpy': None,\n    'http://docs.scipy.org/doc/scipy/reference': None,\n    'http://matplotlib.org/': None,\n    'http://scikit-learn.org/0.17': None,\n    'http://nipy.org/nibabel/': None,\n    'http://pandas.pydata.org/pandas-docs/stable/': None,\n    'http://neurosynth.readthedocs.io/en/latest/': None,\n}\n\n# If your documentation needs a minimal Sphinx version, state it here.\nneeds_sphinx = '2.2.0'\n\n# Generate stubs\nautosummary_generate = True\nautodoc_default_flags = ['members', 'inherited-members']\nadd_module_names = False\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix of source filenames.\nsource_suffix = ['.rst', '.md']\n\n# The master toctree document.\nmaster_doc = 'index'\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 = ['_build', 'Thumbs.db', '.DS_Store']\n\n# The short X.Y version.\nversion = ''\n# The full version, including alpha/beta/rc tags.\nimport bids\nrelease = bids.__version__\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\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#\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = \"sphinx_rtd_theme\"\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\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\n# If false, no module index is generated.\nhtml_domain_indices = False\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    ('index', 'bids', 'bids Documentation',\n     [author], 1)\n]\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  ('index', 'bids', 'bids Documentation',\n   author, 'bids', 'One line description of project.',\n   'Miscellaneous'),\n]\n\n# If false, no module index is generated.\ntexinfo_domain_indices = False\n", "path": "doc/conf.py"}], "after_files": [{"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\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\nfrom datetime import date\n\nimport sphinx_rtd_theme\n\nimport bids\n\nsys.path.insert(0, os.path.abspath('../'))\n\n# -- Project information -----------------------------------------------------\n\nproject = 'PyBIDS'\ncopyright = '2015-{}, Developers of PyBIDS'.format(date.today().year)\nauthor = 'Developers of PyBIDS'\n\ncurrentdir = os.path.abspath(os.path.dirname(__file__))\ncurrentdir = os.path.abspath(os.path.dirname(__file__))\n\n# -- General configuration ---------------------------------------------------\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.autodoc',\n    'sphinx.ext.autosummary',\n    'sphinx.ext.autosectionlabel',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.coverage',\n    'sphinx.ext.mathjax',\n    'sphinx.ext.viewcode',\n    'sphinx.ext.githubpages',\n    'sphinx.ext.napoleon',\n    'numpydoc',\n]\n\nintersphinx_mapping = {\n    'https://docs.python.org/3.5': None,\n    'https://docs.scipy.org/doc/numpy': None,\n    'https://docs.scipy.org/doc/scipy/reference': None,\n    'https://matplotlib.org/': None,\n    'https://scikit-learn.org/0.17': None,\n    'https://nipy.org/nibabel/': None,\n    'https://pandas.pydata.org/pandas-docs/stable/': None,\n    'https://neurosynth.readthedocs.io/en/latest/': None,\n}\n\nintersphinx_timeout = 5\n\n# If your documentation needs a minimal Sphinx version, state it here.\nneeds_sphinx = '2.2.0'\n\n# Generate stubs\nautosummary_generate = True\nautodoc_default_flags = ['members', 'inherited-members']\nadd_module_names = False\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix of source filenames.\nsource_suffix = ['.rst', '.md']\n\n# The master toctree document.\nmaster_doc = 'index'\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 = ['_build', 'Thumbs.db', '.DS_Store']\n\n# The short X.Y version.\nversion = bids.__version__\n# The full version, including alpha/beta/rc tags.\nrelease = version\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\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#\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = \"sphinx_rtd_theme\"\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\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\n# If false, no module index is generated.\nhtml_domain_indices = False\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    ('index', 'bids', 'bids Documentation',\n     [author], 1)\n]\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  ('index', 'bids', 'bids Documentation',\n   author, 'bids', 'One line description of project.',\n   'Miscellaneous'),\n]\n\n# If false, no module index is generated.\ntexinfo_domain_indices = False\n", "path": "doc/conf.py"}]}