Source code for bioregistry.align.ontobee

# -*- coding: utf-8 -*-

"""Align OntoBee with the Bioregistry."""

import textwrap
from typing import Sequence

from bioregistry.align.utils import Aligner
from bioregistry.external.ontobee import get_ontobee

__all__ = ["OntobeeAligner"]


[docs]class OntobeeAligner(Aligner): """Aligner for OntoBee xref registry.""" key = "ontobee" getter = get_ontobee curation_header = ("name", "url")
[docs] def get_curation_row(self, external_id, external_entry) -> Sequence[str]: """Return the relevant fields from an OntoBee entry for pretty-printing.""" return [ textwrap.shorten(external_entry["name"], 50), external_entry.get("url"), ]
if __name__ == "__main__": OntobeeAligner.cli()