Skip to content

Commit f3c5fa1

Browse files
committed
Uncommented
get_term() method to expose it in the public API
1 parent 9d0fe35 commit f3c5fa1

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

ontograph/client.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -456,22 +456,22 @@ def _get_ontology(self) -> Ontology:
456456
return self._ontology
457457

458458
# ---- Navigation Methods
459-
# def get_term(self, term_id: str) -> object:
460-
# """Retrieve a term by its ID.
461-
462-
# Args:
463-
# term_id (str): Term identifier.
464-
465-
# Returns:
466-
# object: Term object.
467-
468-
# Example:
469-
# >>> client = ClientOntology()
470-
# >>> ontology = client.load(file_path_ontology="./tests/resources/dummy_ontology.obo")
471-
# >>> client.get_term("A")
472-
# Term('A', name='termA')
473-
# """
474-
# return self._navigator.get_term(term_id=term_id)
459+
def get_term(self, term_id: str) -> object:
460+
"""Retrieve a term by its ID.
461+
462+
Args:
463+
term_id (str): Term identifier.
464+
465+
Returns:
466+
object: Term object.
467+
468+
Example:
469+
>>> client = ClientOntology()
470+
>>> ontology = client.load(file_path_ontology="./tests/resources/dummy_ontology.obo")
471+
>>> client.get_term("A")
472+
Term('A', name='termA')
473+
"""
474+
return self._navigator.get_term(term_id=term_id)
475475

476476
def get_parents(self, term_id: str, include_self: bool = False) -> list:
477477
"""Get parent terms of a given term.

0 commit comments

Comments
 (0)