Skip to content

Commit

Permalink
fix: ontology_parser.py defaults to latest (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bento007 authored Mar 27, 2024
1 parent 8365411 commit 5b94d6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/python/src/cellxgene_ontology_guide/ontology_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ class OntologyParser:
cxg_schema: CXGSchema
""" CXGSchema object to fetch ontology metadata from """

def __init__(self, schema_version: str):
def __init__(self, schema_version: Optional[str] = None):
"""
Initialize an OntologyParser object with the ontology metadata corresponding to the given CellxGene schema
version. If not cached, it will make a network call to GitHub Release Assets to load in memory and
parse the corresponding ontology metadata.
:param schema_version: str version of the schema to load ontology metadata for
:param schema_version: str version of the schema to load ontology metadata for. If not provided, the latest is loaded.
"""
self.cxg_schema = CXGSchema(version=schema_version)
self.cxg_schema = CXGSchema(version=schema_version) if schema_version else CXGSchema()

def _parse_ontology_name(self, term_id: str) -> str:
"""
Expand Down

0 comments on commit 5b94d6e

Please sign in to comment.