-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from nestauk/tweaks-package
Tweaks to package
- Loading branch information
Showing
5 changed files
with
28 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import yaml | ||
from pathlib import Path | ||
from typing import Optional | ||
import logging | ||
|
||
|
||
def get_yaml_config(file_path: Path) -> Optional[dict]: | ||
"""Fetch yaml config and return as dict if it exists.""" | ||
if file_path.exists(): | ||
with open(file_path, "rt") as f: | ||
return yaml.load(f.read(), Loader=yaml.FullLoader) | ||
|
||
|
||
# Define project base directory | ||
PROJECT_DIR = Path(__file__).resolve().parents[1] | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
soc_mapper_config = get_yaml_config(PROJECT_DIR / "nlp_link/soc_mapper/config.yaml") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "nlp-link" | ||
version = "0.1.2" | ||
version = "0.1.3" | ||
description = "A python package to semantically link two lists of texts." | ||
authors = ["Nesta <[email protected]>"] | ||
readme = "README.md" | ||
|
@@ -15,10 +15,11 @@ torch = "^1.13.1" | |
pytest = "^8.3.2" | ||
tqdm = "^4.66.4" | ||
numpy = "^1.26.4" | ||
s3fs = "^2022.5.0" | ||
openpyxl = "^3.1.3" | ||
boto3 = "^1.21.21" | ||
wasabi = "^1.1.3" | ||
s3fs = {extras = ["boto3"], version = ">=2023.12.0"} | ||
boto3 = "*" | ||
botocore = "*" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
|