prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Unify documentation to use `-` instead of `_`
  ### Describe what the documentation is missing.
  
  Some docs use `_` as the separator and some use `-`, for example:
  - `https://flower.dev/docs/example_walkthrough_pytorch_mnist.html`
  - `https://flower.dev/docs/example-mxnet-walk-through.html`
  
  This is inconsistent.
  
  ### Suggest your improvement.
  
  We want to unify all docs to use `-` ("minus") as the only separator. This involves the following TODO's:
  
  - [ ] Rename all docs that use `_` (and replace it with `-`)
  - [ ] For each renamed doc, configure a redirect from the old naming (e.g., `quickstart_pytorch`) to the new page (e.g., `quickstart-pytorch`) using, for example, https://documatt.gitlab.io/sphinx-reredirects/index.html
  - [ ] Update all references in the docs with the new naming (e.g., in `index.rst`)
  - [ ] Update all other references with the new naming (e.g., README.md, code examples, website, ...)
  
  Last, but not least, this should all be done in a single PR. We should not split, for example, the renaming of a page and the configuration of a redirect into two PRs because it would lead to a deployed version of the docs where users would see a 404 page when they use a link that points to the old naming.
  
  </issue>
  <code>
  [start of doc/source/conf.py]
  1 # Copyright 2020 Adap GmbH. All Rights Reserved.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 # ==============================================================================
  15 import os
  16 import sys
  17 from sphinx.application import ConfigError
  18 
  19 # Configuration file for the Sphinx documentation builder.
  20 #
  21 # This file only contains a selection of the most common options. For a full
  22 # list see the documentation:
  23 # https://www.sphinx-doc.org/en/master/usage/configuration.html
  24 
  25 
  26 # Fixing path issue for autodoc
  27 sys.path.insert(0, os.path.abspath('../../src/py'))
  28 
  29 
  30 # -- Project information -----------------------------------------------------
  31 
  32 project = u"Flower"
  33 copyright = u"2022 Adap GmbH"
  34 author = u"The Flower Authors"
  35 
  36 # The full version, including alpha/beta/rc tags
  37 release = u"0.19.0"
  38 
  39 
  40 # -- General configuration ---------------------------------------------------
  41 
  42 # Add any Sphinx extension module names here, as strings. They can be
  43 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  44 # ones.
  45 extensions = [
  46     "sphinx.ext.napoleon",
  47     "sphinx.ext.autodoc",
  48     "sphinx.ext.mathjax",
  49     "sphinx.ext.viewcode",
  50     "sphinx.ext.graphviz",
  51     "sphinx_copybutton",
  52     "sphinx_panels",
  53     "sphinxcontrib.mermaid",
  54 ]
  55 
  56 # Add any paths that contain templates here, relative to this directory.
  57 templates_path = ["_templates"]
  58 
  59 # List of patterns, relative to source directory, that match files and
  60 # directories to ignore when looking for source files.
  61 # This pattern also affects html_static_path and html_extra_path.
  62 exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
  63 
  64 
  65 # -- Options for HTML output -------------------------------------------------
  66 
  67 # The theme to use for HTML and HTML Help pages.  See the documentation for
  68 # a list of builtin themes.
  69 #
  70 html_theme = "furo"
  71 html_title = f"Flower {release}"
  72 html_logo = "_static/flower-logo.png"
  73 html_favicon = "_static/favicon.ico"
  74 html_baseurl = "https://flower.dev/docs/"
  75 
  76 html_theme_options = {
  77     # Sphinx Book Theme
  78     # https://sphinx-book-theme.readthedocs.io/en/latest/configure.html
  79     # "repository_url": "https://github.com/adap/flower",
  80     # "repository_branch": "main",
  81     # "path_to_docs": "doc/source/",
  82     # "home_page_in_toc": True,
  83     # "use_repository_button": True,
  84     # "use_issues_button": True,
  85     # "use_edit_page_button": True,
  86 
  87     # Furo
  88     # https://pradyunsg.me/furo/customisation/
  89     # "light_css_variables": {
  90     #     "color-brand-primary": "#292F36",
  91     #     "color-brand-content": "#292F36",  
  92     #     "color-admonition-background": "#F2B705",
  93     # },
  94     "announcement": "Flower Summit 2022 <a href=\"https://flower.dev/conf/flower-summit-2022/\">register now</a>",
  95 }
  96 
  97 # Add any paths that contain custom static files (such as style sheets) here,
  98 # relative to this directory. They are copied after the builtin static files,
  99 # so a file named "default.css" will overwrite the builtin "default.css".
  100 html_static_path = ["_static"]
  101 html_css_files = ["custom.css"]
  102
  [end of doc/source/conf.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/doc/source/conf.py b/doc/source/conf.py
  --- a/doc/source/conf.py
  +++ b/doc/source/conf.py
  @@ -51,6 +51,7 @@
       "sphinx_copybutton",
       "sphinx_panels",
       "sphinxcontrib.mermaid",
  +    "sphinx_reredirects"
   ]
   
   # Add any paths that contain templates here, relative to this directory.
  @@ -61,6 +62,19 @@
   # This pattern also affects html_static_path and html_extra_path.
   exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
   
  +# Sphinx redirects, implemented after the doc filename changes.
  +# To prevent 404 errors and redirect to the new pages.
  +redirects = {
  +    "quickstart_mxnet": "quickstart-mxnet.html",
  +    "quickstart_pytorch_lightning": "quickstart-pytorch-lightning.html",
  +    "example_walkthrough_pytorch_mnist": "example-walkthrough-pytorch-mnist.html",
  +    "quickstart_huggingface": "quickstart-huggingface.html",
  +    "quickstart_pytorch": "quickstart-pytorch.html",
  +    "quickstart_tensorflow": "quickstart-tensorflow.html",
  +    "release_process": "release-process.html",
  +    "quickstart_scikitlearn": "quickstart-scikitlearn.html"
  +}
  +
   
   # -- Options for HTML output -------------------------------------------------
  
verification_info: {"golden_diff": "diff --git a/doc/source/conf.py b/doc/source/conf.py\n--- a/doc/source/conf.py\n+++ b/doc/source/conf.py\n@@ -51,6 +51,7 @@\n     \"sphinx_copybutton\",\n     \"sphinx_panels\",\n     \"sphinxcontrib.mermaid\",\n+    \"sphinx_reredirects\"\n ]\n \n # Add any paths that contain templates here, relative to this directory.\n@@ -61,6 +62,19 @@\n # This pattern also affects html_static_path and html_extra_path.\n exclude_patterns = [\"_build\", \"Thumbs.db\", \".DS_Store\"]\n \n+# Sphinx redirects, implemented after the doc filename changes.\n+# To prevent 404 errors and redirect to the new pages.\n+redirects = {\n+    \"quickstart_mxnet\": \"quickstart-mxnet.html\",\n+    \"quickstart_pytorch_lightning\": \"quickstart-pytorch-lightning.html\",\n+    \"example_walkthrough_pytorch_mnist\": \"example-walkthrough-pytorch-mnist.html\",\n+    \"quickstart_huggingface\": \"quickstart-huggingface.html\",\n+    \"quickstart_pytorch\": \"quickstart-pytorch.html\",\n+    \"quickstart_tensorflow\": \"quickstart-tensorflow.html\",\n+    \"release_process\": \"release-process.html\",\n+    \"quickstart_scikitlearn\": \"quickstart-scikitlearn.html\"\n+}\n+\n \n # -- Options for HTML output -------------------------------------------------\n", "issue": "Unify documentation to use `-` instead of `_`\n### Describe what the documentation is missing.\n\nSome docs use `_` as the separator and some use `-`, for example:\r\n- `https://flower.dev/docs/example_walkthrough_pytorch_mnist.html`\r\n- `https://flower.dev/docs/example-mxnet-walk-through.html`\r\n\r\nThis is inconsistent.\n\n### Suggest your improvement.\n\nWe want to unify all docs to use `-` (\"minus\") as the only separator. This involves the following TODO's:\r\n\r\n- [ ] Rename all docs that use `_` (and replace it with `-`)\r\n- [ ] For each renamed doc, configure a redirect from the old naming (e.g., `quickstart_pytorch`) to the new page (e.g., `quickstart-pytorch`) using, for example, https://documatt.gitlab.io/sphinx-reredirects/index.html\r\n- [ ] Update all references in the docs with the new naming (e.g., in `index.rst`)\r\n- [ ] Update all other references with the new naming (e.g., README.md, code examples, website, ...)\r\n\r\nLast, but not least, this should all be done in a single PR. We should not split, for example, the renaming of a page and the configuration of a redirect into two PRs because it would lead to a deployed version of the docs where users would see a 404 page when they use a link that points to the old naming.\n", "before_files": [{"content": "# Copyright 2020 Adap GmbH. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\nimport os\nimport sys\nfrom sphinx.application import ConfigError\n\n# 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\n# Fixing path issue for autodoc\nsys.path.insert(0, os.path.abspath('../../src/py'))\n\n\n# -- Project information -----------------------------------------------------\n\nproject = u\"Flower\"\ncopyright = u\"2022 Adap GmbH\"\nauthor = u\"The Flower Authors\"\n\n# The full version, including alpha/beta/rc tags\nrelease = u\"0.19.0\"\n\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.napoleon\",\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.mathjax\",\n    \"sphinx.ext.viewcode\",\n    \"sphinx.ext.graphviz\",\n    \"sphinx_copybutton\",\n    \"sphinx_panels\",\n    \"sphinxcontrib.mermaid\",\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\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\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 = \"furo\"\nhtml_title = f\"Flower {release}\"\nhtml_logo = \"_static/flower-logo.png\"\nhtml_favicon = \"_static/favicon.ico\"\nhtml_baseurl = \"https://flower.dev/docs/\"\n\nhtml_theme_options = {\n    # Sphinx Book Theme\n    # https://sphinx-book-theme.readthedocs.io/en/latest/configure.html\n    # \"repository_url\": \"https://github.com/adap/flower\",\n    # \"repository_branch\": \"main\",\n    # \"path_to_docs\": \"doc/source/\",\n    # \"home_page_in_toc\": True,\n    # \"use_repository_button\": True,\n    # \"use_issues_button\": True,\n    # \"use_edit_page_button\": True,\n\n    # Furo\n    # https://pradyunsg.me/furo/customisation/\n    # \"light_css_variables\": {\n    #     \"color-brand-primary\": \"#292F36\",\n    #     \"color-brand-content\": \"#292F36\",  \n    #     \"color-admonition-background\": \"#F2B705\",\n    # },\n    \"announcement\": \"Flower Summit 2022 <a href=\\\"https://flower.dev/conf/flower-summit-2022/\\\">register now</a>\",\n}\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\"]\nhtml_css_files = [\"custom.css\"]\n", "path": "doc/source/conf.py"}]}