Skip to content

Commit 3916167

Browse files
feat: improve look & feel for printing the ontology details in console
1 parent 4ed4cc2 commit 3916167

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ontograph/ontology_registry.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pprint
12
from pathlib import Path
23

34
import yaml
@@ -54,7 +55,7 @@ def load_registry(self, force_download: bool = False) -> dict:
5455
with open(registry_path) as f:
5556
self._registry = yaml.safe_load(f)
5657

57-
return self._registry
58+
return 'Ontology successfully loaded in memory'
5859

5960
@property
6061
def registry(self) -> dict:
@@ -128,7 +129,7 @@ def get_ontology_metadata(self, ontology_id: str) -> dict | None:
128129
"""
129130
for ontology in self.registry.get('ontologies', []):
130131
if ontology.get('id') == ontology_id:
131-
return ontology
132+
return pprint.pprint(ontology)
132133
return None
133134

134135
def get_download_url(

0 commit comments

Comments
 (0)