Skip to content

Commit 0a6c14d

Browse files
fix: change log messages to avoid duplicated in similar functions
1 parent 4fe97c0 commit 0a6c14d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

ontograph/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ def load(
376376
>>> client = ClientOntology()
377377
>>> client.load(source="./tests/resources/dummy_ontology.obo")
378378
"""
379+
logger.info('--- Ontology load session start ---')
379380
logger.info('Loading ontology: %s', source)
380381
resolved_downloader = (
381382
_resolve_downloader(self._cache_dir, downloader)
@@ -462,6 +463,7 @@ def load(
462463
self._initialize_queries(backend)
463464

464465
logger.info('Ontology loading complete.')
466+
logger.info('--- Ontology load session end ---')
465467

466468
def _initialize_queries(self, backend: str) -> None:
467469
"""Initializes query adapters for navigation, relations, and introspection based on the specified backend.

ontograph/loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def _load_ontology(
263263
FileNotFoundError: If file doesn't exist.
264264
ValueError: If parsing fails.
265265
"""
266-
logger.debug(f'Loading ontology from file: {path_file}')
266+
logger.debug(f'Parsing ontology file: {path_file}')
267267
if not path_file.exists():
268268
error_msg = f'Ontology file not found: {path_file}'
269269
logger.error(error_msg)
@@ -478,7 +478,7 @@ def load_from_catalog(
478478
name_id, format, downloader=downloader
479479
)
480480

481-
logger.debug(f'Loading ontology from file: {file_path}')
481+
logger.debug(f'Resolved local file: {file_path}')
482482
ontology_source, _ = self._load_ontology(file_path)
483483

484484
logger.debug(f'Retrieving metadata for ontology: {name_id}')

0 commit comments

Comments
 (0)