From b67d889a6741c9886ebacc497954a00f511411c3 Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Thu, 5 Dec 2024 08:16:06 -0600 Subject: [PATCH 1/4] modified: .github/workflows/python-package.yml - Removed 3.6, 3.7, and 3.8 from `matrix.python-version` and added 3.10, 3.11, 3.12, and 3.13. modified: README.md - Changed supported Python versions from 3.6+ to 3.9+. --- .github/workflows/python-package.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5d37e52..6e194ea 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.6", "3.7", "3.8", "3.9"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index dfe0119..96ab684 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Contextual word checker for better suggestions [![license](https://img.shields.io/github/license/r1j1t/contextualSpellCheck)](https://github.com/R1j1t/contextualSpellCheck/blob/master/LICENSE) [![PyPI](https://img.shields.io/pypi/v/contextualSpellCheck?color=green)](https://pypi.org/project/contextualSpellCheck/) -[![Python-Version](https://img.shields.io/badge/Python-3.6+-green)](https://github.com/R1j1t/contextualSpellCheck#install) +[![Python-Version](https://img.shields.io/badge/Python-3.9+-green)](https://github.com/R1j1t/contextualSpellCheck#install) [![Downloads](https://pepy.tech/badge/contextualspellcheck/week)](https://pepy.tech/project/contextualspellcheck) [![GitHub contributors](https://img.shields.io/github/contributors/r1j1t/contextualSpellCheck)](https://github.com/R1j1t/contextualSpellCheck/graphs/contributors) [![Help Wanted](https://img.shields.io/badge/Help%20Wanted-Task%20List-violet)](https://github.com/R1j1t/contextualSpellCheck#task-list) From 6f8bde1efd5529111cc982ad0323bd8cdebd9bb4 Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Sun, 8 Dec 2024 17:48:17 -0600 Subject: [PATCH 2/4] modified: contextualSpellCheck/contextualSpellCheck.py - Set `encoding="utf8"` in :method:`ContextualSpellCheck.__init__` when `debug=True` to resolve failing unit test, :callable:`test_vocab_file`. modified: contextualSpellCheck/tests/test_contextualSpellCheck.py - Set `encoding="utf8"` in test :callable:`test_vocab_file` to match encoding in :method:`ContextualSpellCheck.__init__` when `debug=True` allowing test to pass. --- contextualSpellCheck/contextualSpellCheck.py | 2 +- contextualSpellCheck/tests/test_contextualSpellCheck.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contextualSpellCheck/contextualSpellCheck.py b/contextualSpellCheck/contextualSpellCheck.py index 62e2a91..d547f62 100755 --- a/contextualSpellCheck/contextualSpellCheck.py +++ b/contextualSpellCheck/contextualSpellCheck.py @@ -92,7 +92,7 @@ def __init__( debug_file_path = os.path.join( current_path, "tests", "debugFile.txt" ) - with open(debug_file_path, "w+") as new_file: + with open(debug_file_path, "w+", encoding="utf8") as new_file: new_file.write("\n".join(words)) print("Final vocab at " + debug_file_path) diff --git a/contextualSpellCheck/tests/test_contextualSpellCheck.py b/contextualSpellCheck/tests/test_contextualSpellCheck.py index aa33306..1280380 100644 --- a/contextualSpellCheck/tests/test_contextualSpellCheck.py +++ b/contextualSpellCheck/tests/test_contextualSpellCheck.py @@ -593,8 +593,8 @@ def test_vocab_file(): ContextualSpellCheck( nlp, "contextualSpellCheck", vocab_path=testVocab, debug=True ) - with open(orgDebugFilePath) as f1: - with open(debugPathFile) as f2: + with open(orgDebugFilePath, encoding="utf8") as f1: + with open(debugPathFile, encoding="utf8") as f2: assert f1.read() == f2.read() From 5cb57ff7a14a0c3f7bfdd04dce1a2a5aa1ee8d9b Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Sun, 8 Dec 2024 18:35:36 -0600 Subject: [PATCH 3/4] modified: contextualSpellCheck/contextualSpellCheck.py - Formatted with black. --- contextualSpellCheck/contextualSpellCheck.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contextualSpellCheck/contextualSpellCheck.py b/contextualSpellCheck/contextualSpellCheck.py index d547f62..1a0ce89 100755 --- a/contextualSpellCheck/contextualSpellCheck.py +++ b/contextualSpellCheck/contextualSpellCheck.py @@ -92,7 +92,9 @@ def __init__( debug_file_path = os.path.join( current_path, "tests", "debugFile.txt" ) - with open(debug_file_path, "w+", encoding="utf8") as new_file: + with open( + debug_file_path, "w+", encoding="utf8" + ) as new_file: new_file.write("\n".join(words)) print("Final vocab at " + debug_file_path) From a33478e07a2f02896ec268013a7b2f4b5c0ef814 Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Sun, 8 Dec 2024 18:48:40 -0600 Subject: [PATCH 4/4] modified: .github/workflows/python-package.yml - Removed 3.13 as the spacy whl file cannot be built yet. See https://github.com/explosion/srsly/issues/112 for details. --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 6e194ea..a4baeaf 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4