Skip to content

Commit

Permalink
Merge pull request #18 from cedadev/v0.1.4
Browse files Browse the repository at this point in the history
V0.1.4: Logs, poetry and python
  • Loading branch information
dwest77a authored Nov 20, 2024
2 parents f951f1c + 9cff5fc commit 37a2f71
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions facet_scanner/collection_handlers/utils/facet_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
import os
from typing import Optional, Tuple
from facet_scanner.collection_handlers.base import CollectionHandler
import logging

from facet_scanner import logstream

logger = logging.getLogger(__name__)
logger.addHandler(logstream)
logger.propagate = False

class FacetFactory:
"""
Expand Down Expand Up @@ -56,6 +62,7 @@ def get_handler(self, path: str) -> Tuple[Optional[CollectionHandler], Optional[
:rtype: CollectionHandler, str
"""

logger.debug('Locating collection details')
collection_details, collection_path = self.get_collection_map(path)
if collection_details is not None:
return locate(collection_details['handler']), collection_path
Expand Down
7 changes: 7 additions & 0 deletions facet_scanner/collection_handlers/utils/moles_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
from json.decoder import JSONDecodeError
from requests.exceptions import Timeout
import json
import logging

from facet_scanner import logstream

logger = logging.getLogger(__name__)
logger.addHandler(logstream)
logger.propagate = False

MOLES_MAPPING_FILE = os.environ.get('MOLES_MAPPING_FILE')

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "facet-scanner"
version = "0.1.3"
version = "0.1.4"
description = "Extracts facets from datasets to add to elasticsearch."
authors = ["Daniel Westwood <[email protected]>"]
license = "{file='LICENSE'}"
Expand All @@ -20,7 +20,7 @@ include = [
]

[tool.poetry.dependencies]
python = "^3.12"
python = ">=3.8,<4.0"
elasticsearch = "^7"
requests = "^2.32.3"
tqdm = "^4.66.6"
Expand Down

0 comments on commit 37a2f71

Please sign in to comment.