Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.1.4: Logs, poetry and python #18

Merged
merged 2 commits into from
Nov 20, 2024
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: 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