prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Update colors of progress states
  The current color scheme for our progress states makes it hard to know when something needs further attention and when it does not. Previously we had three colors: Red-Failed, Yellow-Not evaluated yet and Green-Passed. 
  
  The new 'Asked to Repeat' progress state option  is also yellow and so it conflicts with the 'Not Evaluated Yet' option.
  
  **Please update the color for 'Asked to Repeat' to blue.. Any shade will do.**
  
  Progress state colors can be viewed on the [More>Trainees page ](https://amy.carpentries.org/trainings/trainees/)
  
  </issue>
  <code>
  [start of amy/workshops/templatetags/training_progress.py]
  1 from django import template
  2 from django.template.defaultfilters import escape
  3 from django.utils.safestring import mark_safe
  4 
  5 from workshops.models import TrainingProgress
  6 
  7 register = template.Library()
  8 
  9 
  10 @register.simple_tag
  11 def progress_label(progress):
  12     assert isinstance(progress, TrainingProgress)
  13 
  14     if progress.discarded:
  15         additional_label = "dark"
  16 
  17     else:
  18         switch = {
  19             "n": "warning",
  20             "f": "danger",
  21             "a": "warning",
  22             "p": "success",
  23         }
  24         additional_label = switch[progress.state]
  25 
  26     fmt = "badge badge-{}".format(additional_label)
  27     return mark_safe(fmt)
  28 
  29 
  30 @register.simple_tag
  31 def progress_description(progress):
  32     assert isinstance(progress, TrainingProgress)
  33 
  34     text = "{discarded}{state} {type}<br />{evaluated_by}<br />on {day}.{notes}".format(
  35         discarded="discarded " if progress.discarded else "",
  36         state=progress.get_state_display(),
  37         type=progress.requirement,
  38         evaluated_by=(
  39             "evaluated by {}".format(progress.evaluated_by.full_name)
  40             if progress.evaluated_by is not None
  41             else "submitted"
  42         ),
  43         day=progress.created_at.strftime("%A %d %B %Y at %H:%M"),
  44         notes="<br />Notes: {}".format(escape(progress.notes))
  45         if progress.notes
  46         else "",
  47     )
  48     text = text[0].upper() + text[1:]
  49     return mark_safe(text)
  50
  [end of amy/workshops/templatetags/training_progress.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/amy/workshops/templatetags/training_progress.py b/amy/workshops/templatetags/training_progress.py
  --- a/amy/workshops/templatetags/training_progress.py
  +++ b/amy/workshops/templatetags/training_progress.py
  @@ -18,7 +18,7 @@
           switch = {
               "n": "warning",
               "f": "danger",
  -            "a": "warning",
  +            "a": "info",
               "p": "success",
           }
           additional_label = switch[progress.state]
  
verification_info: {"golden_diff": "diff --git a/amy/workshops/templatetags/training_progress.py b/amy/workshops/templatetags/training_progress.py\n--- a/amy/workshops/templatetags/training_progress.py\n+++ b/amy/workshops/templatetags/training_progress.py\n@@ -18,7 +18,7 @@\n         switch = {\n             \"n\": \"warning\",\n             \"f\": \"danger\",\n-            \"a\": \"warning\",\n+            \"a\": \"info\",\n             \"p\": \"success\",\n         }\n         additional_label = switch[progress.state]\n", "issue": "Update colors of progress states\nThe current color scheme for our progress states makes it hard to know when something needs further attention and when it does not. Previously we had three colors: Red-Failed, Yellow-Not evaluated yet and Green-Passed. \r\n\r\nThe new 'Asked to Repeat' progress state option  is also yellow and so it conflicts with the 'Not Evaluated Yet' option.\r\n\r\n**Please update the color for 'Asked to Repeat' to blue.. Any shade will do.**\r\n\r\nProgress state colors can be viewed on the [More>Trainees page ](https://amy.carpentries.org/trainings/trainees/)\n", "before_files": [{"content": "from django import template\nfrom django.template.defaultfilters import escape\nfrom django.utils.safestring import mark_safe\n\nfrom workshops.models import TrainingProgress\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef progress_label(progress):\n    assert isinstance(progress, TrainingProgress)\n\n    if progress.discarded:\n        additional_label = \"dark\"\n\n    else:\n        switch = {\n            \"n\": \"warning\",\n            \"f\": \"danger\",\n            \"a\": \"warning\",\n            \"p\": \"success\",\n        }\n        additional_label = switch[progress.state]\n\n    fmt = \"badge badge-{}\".format(additional_label)\n    return mark_safe(fmt)\n\n\n@register.simple_tag\ndef progress_description(progress):\n    assert isinstance(progress, TrainingProgress)\n\n    text = \"{discarded}{state} {type}<br />{evaluated_by}<br />on {day}.{notes}\".format(\n        discarded=\"discarded \" if progress.discarded else \"\",\n        state=progress.get_state_display(),\n        type=progress.requirement,\n        evaluated_by=(\n            \"evaluated by {}\".format(progress.evaluated_by.full_name)\n            if progress.evaluated_by is not None\n            else \"submitted\"\n        ),\n        day=progress.created_at.strftime(\"%A %d %B %Y at %H:%M\"),\n        notes=\"<br />Notes: {}\".format(escape(progress.notes))\n        if progress.notes\n        else \"\",\n    )\n    text = text[0].upper() + text[1:]\n    return mark_safe(text)\n", "path": "amy/workshops/templatetags/training_progress.py"}]}