Skip to content

Commit

Permalink
Improve complexportal xrefs
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Jan 8, 2024
1 parent 5bf8303 commit c1eccb2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pyobo/sources/complexportal.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,15 @@ def _parse_xrefs(s) -> List[Tuple[Reference, str]]:
logger.warning("xref missing (: %s", xref)
continue
note = note.rstrip(")")
note.replace("rhea:rhea ", "rhea:")
note.replace("rhea:Rhea ", "rhea:")
note.replace("eccode::", "eccode:")
note.replace("eccode:EC:", "eccode:")
note.replace("eccode:RHEA:", "rhea:")
if note.lower().startswith("rhea "):
note = note[len("Rhea ") :]
if note.lower().startswith("rhea:rhea "):
note = note[len("rhea:rhea ") :]
if note.lower().startswith("EC:"):
note = note[len("EC:") :]
try:
Expand Down

0 comments on commit c1eccb2

Please sign in to comment.