Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bento007 committed May 14, 2024
1 parent 3c3f5ab commit 6c11b71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/python/src/cellxgene_ontology_guide/ontology_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def map_term_labels(self, term_ids: Iterable[str]) -> Dict[str, str]:
>>> from cellxgene_ontology_guide.ontology_parser import OntologyParser
>>> ontology_parser = OntologyParser()
>>> ontology_parser.map_term_labels(["CL:0000005", "CL:0000003"])
{'CL:0000005': 'fibroblast neural crest derived', 'CL:0000003': 'obsolete native cell'}
{'CL:0000005': 'neural crest derived fibroblast', 'CL:0000003': 'obsolete native cell'}
:param term_ids: list of str ontology terms to fetch label for
:return: Dict[str, str] mapping term IDs to their respective human-readable labels
Expand Down
2 changes: 1 addition & 1 deletion tools/ontology-builder/src/all_ontology_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def _extract_ontology_term_metadata(onto: owlready2.entity.ThingClass) -> Dict[s
term_dict[term_id]["description"] = onto_term.IAO_0000115[0]
# optional synonym list, if available
if hasExactSynonym := getattr(onto_term, "hasExactSynonym", None):
term_dict[term_id]["synonyms"] = [x if isinstance(x, str) else str(x) for x in hasExactSynonym]
term_dict[term_id]["synonyms"] = [str(x) for x in hasExactSynonym]
# Add the "deprecated" status and associated metadata if True
term_dict[term_id]["deprecated"] = False
if onto_term.deprecated and onto_term.deprecated.first():
Expand Down

0 comments on commit 6c11b71

Please sign in to comment.