prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  OBO prefix map should include prefixes of obsolete ontologies
  I think OBO prefix map should contain prefixes of obsolete ontologies. Sometimes, like [here](https://github.com/OBOFoundry/OBOFoundry.github.io/pull/1974/files) one ontology is merged into another, with identifiers and all - it would still be useful to be able to loop these up.
  
  @jamesaoverton objects to that?
  
  </issue>
  <code>
  [start of util/make-shacl-prefixes.py]
  1 #!/usr/bin/env python3
  2 
  3 import csv
  4 import sys
  5 from argparse import ArgumentParser
  6 
  7 import yaml
  8 
  9 
  10 def main(args):
  11     """
  12     Takes ontologies.yml file and makes a triple file with SHACL prefixes.
  13 
  14     For example, for uberon it will generate:
  15 
  16         [ sh:prefix "UBERON" ; sh:namespace "http://purl.obolibrary.org/obo/UBERON_"]
  17 
  18     We always assume the CURIE prefix is uppercase, unless 'preferred_prefix' is specified
  19     (for mixed-case prefixes, e.g. FBbt)
  20 
  21     This can be useful for converting an OBO class PURL to a prefix without assumption-embedding string conversions.
  22     It can be used to interconvert PURLs to CURIEs.
  23 
  24     Note that while prefixes can sometimes be seen in RDF files, this is part of the syntax and not part of the data,
  25     the prefixes are expanded at parse time. The obo_prefixes.ttl file makes these explicit.
  26 
  27     We use the SHACL vocabulary since it provides convenient predicates for putting prefixes in the domain of discourse;
  28     however, it does not entail any use of SHACL
  29 
  30     """
  31     parser = ArgumentParser(
  32         description="""
  33   Takes ontologies.yml file and makes a triple file with shacl prefixes"""
  34     )
  35     parser.add_argument("input")
  36     args = parser.parse_args()
  37     stream = open(args.input, "r")
  38     data = yaml.load(stream, Loader=yaml.SafeLoader)
  39 
  40     print("@prefix sh:	<http://www.w3.org/ns/shacl#> .")
  41     print("@prefix xsd:    <http://www.w3.org/2001/XMLSchema#> .")
  42     print("[")
  43     print(" sh:declare")
  44     sep = ""
  45     for ont in data["ontologies"]:
  46         if ont.get("is_obsolete", False):
  47             continue
  48         prefix = ont.get("preferredPrefix", ont["id"].upper())
  49         print(
  50             f'{sep}[ sh:prefix "{prefix}" ; sh:namespace "http://purl.obolibrary.org/obo/{prefix}_"]'
  51         )
  52         sep = ","
  53     print("] .")
  54 
  55 
  56 if __name__ == "__main__":
  57     main(sys.argv)
  58
  [end of util/make-shacl-prefixes.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/util/make-shacl-prefixes.py b/util/make-shacl-prefixes.py
  --- a/util/make-shacl-prefixes.py
  +++ b/util/make-shacl-prefixes.py
  @@ -43,8 +43,9 @@
       print(" sh:declare")
       sep = ""
       for ont in data["ontologies"]:
  -        if ont.get("is_obsolete", False):
  -            continue
  +        # if ont.get("is_obsolete", False):
  +        #    continue
  +        # See https://github.com/OBOFoundry/OBOFoundry.github.io/issues/1976
           prefix = ont.get("preferredPrefix", ont["id"].upper())
           print(
               f'{sep}[ sh:prefix "{prefix}" ; sh:namespace "http://purl.obolibrary.org/obo/{prefix}_"]'
  
verification_info: {"golden_diff": "diff --git a/util/make-shacl-prefixes.py b/util/make-shacl-prefixes.py\n--- a/util/make-shacl-prefixes.py\n+++ b/util/make-shacl-prefixes.py\n@@ -43,8 +43,9 @@\n     print(\" sh:declare\")\n     sep = \"\"\n     for ont in data[\"ontologies\"]:\n-        if ont.get(\"is_obsolete\", False):\n-            continue\n+        # if ont.get(\"is_obsolete\", False):\n+        #    continue\n+        # See https://github.com/OBOFoundry/OBOFoundry.github.io/issues/1976\n         prefix = ont.get(\"preferredPrefix\", ont[\"id\"].upper())\n         print(\n             f'{sep}[ sh:prefix \"{prefix}\" ; sh:namespace \"http://purl.obolibrary.org/obo/{prefix}_\"]'\n", "issue": "OBO prefix map should include prefixes of obsolete ontologies\nI think OBO prefix map should contain prefixes of obsolete ontologies. Sometimes, like [here](https://github.com/OBOFoundry/OBOFoundry.github.io/pull/1974/files) one ontology is merged into another, with identifiers and all - it would still be useful to be able to loop these up.\r\n\r\n@jamesaoverton objects to that?\n", "before_files": [{"content": "#!/usr/bin/env python3\n\nimport csv\nimport sys\nfrom argparse import ArgumentParser\n\nimport yaml\n\n\ndef main(args):\n    \"\"\"\n    Takes ontologies.yml file and makes a triple file with SHACL prefixes.\n\n    For example, for uberon it will generate:\n\n        [ sh:prefix \"UBERON\" ; sh:namespace \"http://purl.obolibrary.org/obo/UBERON_\"]\n\n    We always assume the CURIE prefix is uppercase, unless 'preferred_prefix' is specified\n    (for mixed-case prefixes, e.g. FBbt)\n\n    This can be useful for converting an OBO class PURL to a prefix without assumption-embedding string conversions.\n    It can be used to interconvert PURLs to CURIEs.\n\n    Note that while prefixes can sometimes be seen in RDF files, this is part of the syntax and not part of the data,\n    the prefixes are expanded at parse time. The obo_prefixes.ttl file makes these explicit.\n\n    We use the SHACL vocabulary since it provides convenient predicates for putting prefixes in the domain of discourse;\n    however, it does not entail any use of SHACL\n\n    \"\"\"\n    parser = ArgumentParser(\n        description=\"\"\"\n  Takes ontologies.yml file and makes a triple file with shacl prefixes\"\"\"\n    )\n    parser.add_argument(\"input\")\n    args = parser.parse_args()\n    stream = open(args.input, \"r\")\n    data = yaml.load(stream, Loader=yaml.SafeLoader)\n\n    print(\"@prefix sh:\t<http://www.w3.org/ns/shacl#> .\")\n    print(\"@prefix xsd:    <http://www.w3.org/2001/XMLSchema#> .\")\n    print(\"[\")\n    print(\" sh:declare\")\n    sep = \"\"\n    for ont in data[\"ontologies\"]:\n        if ont.get(\"is_obsolete\", False):\n            continue\n        prefix = ont.get(\"preferredPrefix\", ont[\"id\"].upper())\n        print(\n            f'{sep}[ sh:prefix \"{prefix}\" ; sh:namespace \"http://purl.obolibrary.org/obo/{prefix}_\"]'\n        )\n        sep = \",\"\n    print(\"] .\")\n\n\nif __name__ == \"__main__\":\n    main(sys.argv)\n", "path": "util/make-shacl-prefixes.py"}]}