Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions 04_workdir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
logging:
handlers:
file:
filename: logs/my_saezapp_logger.log

filename: logs/app_go_logger.log
loggers:
default:
level: DEBUG
Expand All @@ -22,10 +21,6 @@ logging:
handlers: [file, console]
propagate: false

root:
level: WARNING
handlers: [file, console]

# -------------------------------------
# ---- Integrations -----
# -------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion ontograph/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def __init__(
'Install it to use DownloadManagerAdapter.'
) from exc

self._cache_dir = cache_dir
self._cache_dir = Path(cache_dir)
self._cache_dir.mkdir(parents=True, exist_ok=True)
self._manager = dm.DownloadManager(
path=str(self._cache_dir),
Expand Down
14 changes: 9 additions & 5 deletions sandbox/use_case_downloaders.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import pkg_infra

from ontograph.client import ClientCatalog, ClientOntology
from ontograph.downloader import PoochDownloaderAdapter
from ontograph.config.settings import DEFAULT_CACHE_DIR
from ontograph.downloader import (
PoochDownloaderAdapter,
DownloadManagerAdapter)


def main():
workspace = './'
cache_dir = './data/out'

# Create a session for the app
session = pkg_infra.get_session(workspace=workspace, include_location=True)
Expand All @@ -21,17 +24,18 @@ def main():
logger.critical('This is a CRITICAL message')

# Call a given downloader from OntoGraph
downloader = PoochDownloaderAdapter(cache_dir=DEFAULT_CACHE_DIR)
#downloader = PoochDownloaderAdapter(cache_dir=cache_dir)
downloader = DownloadManagerAdapter(cache_dir=cache_dir)

# Download a catalog
catalog = ClientCatalog(cache_dir='./data/out', downloader=downloader)
catalog = ClientCatalog(cache_dir=cache_dir, downloader=downloader)
catalog.load_catalog()

# print the schema tree
#catalog.print_catalog_schema_tree()

# Download a given ontology
client = ClientOntology(cache_dir='./data/out', downloader=downloader)
client = ClientOntology(cache_dir=cache_dir, downloader=downloader)
client.load(source='go') # catalog download

if __name__ == '__main__':
Expand Down
Loading