From 945929f4549e1ee103251e5cd5852edff643b407 Mon Sep 17 00:00:00 2001 From: Jk40git <125589910+Jk40git@users.noreply.github.com> Date: Tue, 19 Mar 2024 01:02:41 +0000 Subject: [PATCH 1/4] minor change --- .../languages/French/translations/translate_words.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scribe_data/extract_transform/languages/French/translations/translate_words.py b/src/scribe_data/extract_transform/languages/French/translations/translate_words.py index 62e47429a..18580da4f 100644 --- a/src/scribe_data/extract_transform/languages/French/translations/translate_words.py +++ b/src/scribe_data/extract_transform/languages/French/translations/translate_words.py @@ -4,7 +4,7 @@ Example ------- - python3 src/scribe_data/extract_transform/languages/English/translations/translate_words.py + python3 src/scribe_data/extract_transform/languages/French/translations/translate_words.py """ import json From 6e4d83ee58970af9c3a53bec0898b6a90886ace2 Mon Sep 17 00:00:00 2001 From: Jk40git Date: Thu, 11 Jul 2024 00:17:33 +0000 Subject: [PATCH 2/4] implement pathlib into update_data.py --- src/scribe_data/load/update_files/total_data.json | 2 +- src/scribe_data/wikidata/update_data.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/scribe_data/load/update_files/total_data.json b/src/scribe_data/load/update_files/total_data.json index 79f419ba1..e23c54ab7 100644 --- a/src/scribe_data/load/update_files/total_data.json +++ b/src/scribe_data/load/update_files/total_data.json @@ -36,4 +36,4 @@ "verbs": 4678, "emoji_keywords": 2913 } -} +} \ No newline at end of file diff --git a/src/scribe_data/wikidata/update_data.py b/src/scribe_data/wikidata/update_data.py index 365d14c46..9730aa689 100644 --- a/src/scribe_data/wikidata/update_data.py +++ b/src/scribe_data/wikidata/update_data.py @@ -34,6 +34,7 @@ import json import os +from pathlib import Path from urllib.error import HTTPError from tqdm.auto import tqdm @@ -42,11 +43,15 @@ def update_data(languages=None, word_types=None): - SCRIBE_DATA_SRC_PATH = "src/scribe_data" + p = Path("/src") + q = p / 'scribe_data' + lan = q / 'language_data_extraction' + # SCRIBE_DATA_SRC_PATH = "src/scribe_data" PATH_TO_LANGUAGE_EXTRACTION_FILES = ( - f"{SCRIBE_DATA_SRC_PATH}/language_data_extraction" + lan.resolve() ) - PATH_TO_UPDATE_FILES = f"{SCRIBE_DATA_SRC_PATH}/load/update_files" + PATH_TO_UPDATE_FILES = q / 'load' / 'update_files' + PATH_TO_UPDATE_FILES.resolve() with open(f"{PATH_TO_UPDATE_FILES}/total_data.json", encoding="utf-8") as f: current_data = json.load(f) From c0cbfd25a1148e812b7b2ee2bf8275d70e96faf2 Mon Sep 17 00:00:00 2001 From: Jk40git Date: Thu, 11 Jul 2024 13:32:15 +0000 Subject: [PATCH 3/4] Update the contributing.md and the README.md files --- CONTRIBUTING.md | 12 ++++++++++++ README.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6abee1b37..ede1f4513 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -142,6 +142,18 @@ pip install -r requirements.txt # install dependencies pip install -e . # install the local version of Scribe-Data pre-commit install # install pre-commit hooks # pre-commit run --all-files # lint and fix common problems in the codebase +``` + # On Windows run: +> +``` + # Install the new version of Scribe-Data and reinstalling new packages +pip uninstall scribe-data +pip install . +``` + +``` +# Update the entry_points and console_scripts via the egg info +python setup.py egg_info ``` > [!NOTE] diff --git a/README.md b/README.md index ba938735c..e16dd3eef 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,18 @@ pip install -r requirements.txt # install dependencies pip install -e . # install the local version of Scribe-Data pre-commit install # install pre-commit hooks # pre-commit run --all-files # lint and fix common problems in the codebase +``` + # On Windows run: +> +``` + # Install the new version of Scribe-Data and reinstalling new packages +pip uninstall scribe-data +pip install . +``` + +``` +# Update the entry_points and console_scripts via the egg info +python setup.py egg_info ``` > [!NOTE] From a51f2965b2deff9b40eb45d2212efc1dd1ad80ec Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Wed, 24 Jul 2024 20:35:24 -0600 Subject: [PATCH 4/4] Update to remove already merged changes to readme/contributing --- CONTRIBUTING.md | 12 ------------ README.md | 12 ------------ src/scribe_data/load/update_files/total_data.json | 2 +- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf6fd7fe4..a63066c4f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -149,18 +149,6 @@ pip install -r requirements.txt # install dependencies pip install -e . # install the local version of Scribe-Data pre-commit install # install pre-commit hooks # pre-commit run --all-files # lint and fix common problems in the codebase -``` - # On Windows run: -> -``` - # Install the new version of Scribe-Data and reinstalling new packages -pip uninstall scribe-data -pip install . -``` - -``` -# Update the entry_points and console_scripts via the egg info -python setup.py egg_info ``` If you face any issues, consider reinstalling Scribe-data by running the following: diff --git a/README.md b/README.md index 53b972603..c6633a7c9 100644 --- a/README.md +++ b/README.md @@ -196,18 +196,6 @@ pip install -r requirements.txt # install dependencies pip install -e . # install the local version of Scribe-Data pre-commit install # install pre-commit hooks # pre-commit run --all-files # lint and fix common problems in the codebase -``` - # On Windows run: -> -``` - # Install the new version of Scribe-Data and reinstalling new packages -pip uninstall scribe-data -pip install . -``` - -``` -# Update the entry_points and console_scripts via the egg info -python setup.py egg_info ``` See the [contribution guidelines](https://github.com/scribe-org/Scribe-Data/blob/main/CONTRIBUTING.md) for a more detailed explanation and troubleshooting. diff --git a/src/scribe_data/load/update_files/total_data.json b/src/scribe_data/load/update_files/total_data.json index e23c54ab7..79f419ba1 100644 --- a/src/scribe_data/load/update_files/total_data.json +++ b/src/scribe_data/load/update_files/total_data.json @@ -36,4 +36,4 @@ "verbs": 4678, "emoji_keywords": 2913 } -} \ No newline at end of file +}