prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN 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?
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `util/make-shacl-prefixes.py`
  Content:
  ```
  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 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/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"}], "after_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        # 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        )\n        sep = \",\"\n    print(\"] .\")\n\n\nif __name__ == \"__main__\":\n    main(sys.argv)\n", "path": "util/make-shacl-prefixes.py"}]}